大修改调整

This commit is contained in:
2026-01-11 23:58:02 +08:00
parent ca68084264
commit f7d44f1f8d
72 changed files with 584396 additions and 20533 deletions

View File

@@ -4,6 +4,7 @@ using System.Collections.Generic;
using ECM2;
using ECM2.Examples.FirstPerson;
using Fantasy;
using NBC;
using NBF.Fishing2;
using NBF.Utils;
using UnityEngine;
@@ -28,6 +29,7 @@ namespace NBF
public readonly List<FRod> Tackles = new List<FRod>();
public FRod Rod { get; private set; }
public Fsm<FPlayer> Fsm { get; private set; }
public event Action<FHandItem> OnFishingSetEquiped;
public event Action OnFishingSetUnequip;
@@ -42,6 +44,7 @@ namespace NBF
private void Start()
{
InitFsm();
AddInputEvent();
CreatePlayerModel();
}
@@ -56,6 +59,20 @@ namespace NBF
RemoveInputEvent();
}
#region
private void InitFsm()
{
Fsm = new Fsm<FPlayer>("Player", this, true);
Fsm.RegisterState<PlayerStateIdle>();
Fsm.RegisterState<PlayerStateThrow>();
Fsm.RegisterState<PlayerStateFishing>();
Fsm.RegisterState<PlayerStateFight>();
Fsm.RegisterState<PlayerStatePrepare>();
Fsm.Start<PlayerStateIdle>();
}
#endregion
#region
@@ -117,6 +134,7 @@ namespace NBF
Destroy(Rod.gameObject);
Tackles.Remove(Rod);
Rod = null;
yield return new WaitForSeconds(0.15f);
}
}