大修改调整
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user