111
This commit is contained in:
@@ -172,7 +172,6 @@ GameObject:
|
|||||||
- component: {fileID: 2059248182290203691}
|
- component: {fileID: 2059248182290203691}
|
||||||
- component: {fileID: 8101446342893690422}
|
- component: {fileID: 8101446342893690422}
|
||||||
- component: {fileID: 2923025939212586282}
|
- component: {fileID: 2923025939212586282}
|
||||||
- component: {fileID: 644643694351368293}
|
|
||||||
m_Layer: 14
|
m_Layer: 14
|
||||||
m_Name: Player
|
m_Name: Player
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
@@ -382,18 +381,6 @@ MonoBehaviour:
|
|||||||
_standingDownwardForceScale: 1
|
_standingDownwardForceScale: 1
|
||||||
_camera: {fileID: 0}
|
_camera: {fileID: 0}
|
||||||
cameraParent: {fileID: 6835675132305341997}
|
cameraParent: {fileID: 6835675132305341997}
|
||||||
--- !u!114 &644643694351368293
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 8172838236951268422}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: df8de819db7747ddad97ff39505814a4, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier: Assembly-CSharp::NBF.PlayerFSM
|
|
||||||
--- !u!1 &8378981416044742488
|
--- !u!1 &8378981416044742488
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|||||||
@@ -37,6 +37,8 @@ namespace NBF
|
|||||||
{
|
{
|
||||||
playerStageView.Init(this);
|
playerStageView.Init(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ChangeState(PlayerState.Idle);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateState()
|
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