111
This commit is contained in:
@@ -37,6 +37,8 @@ namespace NBF
|
||||
{
|
||||
playerStageView.Init(this);
|
||||
}
|
||||
|
||||
ChangeState(PlayerState.Idle);
|
||||
}
|
||||
|
||||
public void UpdateState()
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public class PlayerFSM : PlayerMonoBehaviour
|
||||
{
|
||||
private readonly Dictionary<PlayerState, PlayerStageViewBase> _stageViews =
|
||||
new Dictionary<PlayerState, PlayerStageViewBase>();
|
||||
|
||||
private PlayerState _currentState;
|
||||
private PlayerStageViewBase _currentStateView;
|
||||
|
||||
protected override void OnAwake()
|
||||
{
|
||||
_stageViews.Add(PlayerState.Idle, new PlayerStageViewIdle());
|
||||
_stageViews.Add(PlayerState.Prepare, new PlayerStageViewPrepare());
|
||||
_stageViews.Add(PlayerState.Throw, new PlayerStageViewThrow());
|
||||
_stageViews.Add(PlayerState.Fishing, new PlayerStageViewFishing());
|
||||
_stageViews.Add(PlayerState.Fight, new PlayerStageViewFight());
|
||||
foreach (var playerStageView in _stageViews.Values)
|
||||
{
|
||||
playerStageView.Init(Player);
|
||||
}
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
_currentStateView?.Update();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: df8de819db7747ddad97ff39505814a4
|
||||
timeCreated: 1777454838
|
||||
Reference in New Issue
Block a user