增加表格

This commit is contained in:
Bob.Song
2026-03-06 17:48:22 +08:00
parent 5012097465
commit 68beeb3417
32 changed files with 1258 additions and 22939 deletions

View File

@@ -1,116 +1,87 @@
using System;
using UnityEngine;
// using System;
// using UnityEngine;
//
// namespace NBF
// {
// // [Serializable]
// // public enum PlayerState
// // {
// // idle = 0,
// // move = 1,
// // prepare = 2,
// // casting = 3,
// // fishing = 4,
// // baitFlies = 5,
// // fight = 6,
// // fishView = 7,
// // collectFish = 8,
// // throwFish = 9,
// // vehicle = 10,
// // swiming = 11,
// // flyModeDebug = 12,
// // vehicleFishing = 13,
// // preciseCastIdle = 14,
// // preciseCastThrow = 15
// // }
//
namespace NBF
{
// [Serializable]
// public enum PlayerState
// {
// idle = 0,
// move = 1,
// prepare = 2,
// casting = 3,
// fishing = 4,
// baitFlies = 5,
// fight = 6,
// fishView = 7,
// collectFish = 8,
// throwFish = 9,
// vehicle = 10,
// swiming = 11,
// flyModeDebug = 12,
// vehicleFishing = 13,
// preciseCastIdle = 14,
// preciseCastThrow = 15
// }
[Serializable]
public enum PlayerState : uint
{
None = 0,
/// <summary>
/// 闲置等待中
/// </summary>
Idle = 1,
/// <summary>
/// 准备抛竿
/// </summary>
Prepare = 2,
/// <summary>
/// 抛竿中
/// </summary>
Throw = 3,
/// <summary>
/// 钓鱼中
/// </summary>
Fishing = 4,
/// <summary>
/// 溜鱼中
/// </summary>
Fight = 5
}
public class FPlayerData : MonoService<FPlayerData>
{
private PlayerState _previousPlayerState = PlayerState.Idle;
private PlayerState _playerState;
public bool ChangeItem;
public bool Run;
public bool IsGrounded;
public float Speed;
public float RotationSpeed;
public float ReelSpeed;
public float LineTension;
/// <summary>
/// 是否路亚竿
/// </summary>
public bool IsLureRod;
public Vector2 MoveInput;
/// <summary>
///
/// </summary>
public float EyeAngle;
public PlayerState PreviousState => _previousPlayerState;
public PlayerState State
{
get => _playerState;
set
{
_previousPlayerState = _playerState;
_playerState = value;
NextState = value;
OnStateChange?.Invoke(_playerState);
}
}
[SerializeField] private PlayerState NextState;
public event Action<PlayerState> OnStateChange;
private void Start()
{
NextState = State;
}
private void Update()
{
if (NextState != State)
{
State = NextState;
}
}
}
}
//
// public class FPlayerData : MonoService<FPlayerData>
// {
// private PlayerState _previousPlayerState = PlayerState.Idle;
// private PlayerState _playerState;
//
// public bool ChangeItem;
// public bool Run;
// public bool IsGrounded;
// public float Speed;
// public float RotationSpeed;
// public float ReelSpeed;
// public float LineTension;
//
// /// <summary>
// /// 是否路亚竿
// /// </summary>
// public bool IsLureRod;
//
// public Vector2 MoveInput;
//
// /// <summary>
// ///
// /// </summary>
// public float EyeAngle;
//
//
// public PlayerState PreviousState => _previousPlayerState;
//
// public PlayerState State
// {
// get => _playerState;
// set
// {
// _previousPlayerState = _playerState;
// _playerState = value;
// NextState = value;
// OnStateChange?.Invoke(_playerState);
// }
// }
//
// [SerializeField] private PlayerState NextState;
//
// public event Action<PlayerState> OnStateChange;
//
//
// private void Start()
// {
// NextState = State;
// }
//
// private void Update()
// {
// if (NextState != State)
// {
// State = NextState;
// }
// }
// }
// }