From 8dfd7a44fb898d4d7d35d8311d1b506adb3cda2f Mon Sep 17 00:00:00 2001 From: "Bob.Song" Date: Wed, 29 Apr 2026 17:50:16 +0800 Subject: [PATCH] 111 --- Assets/ResRaw/Prefabs/Player/Player.prefab | 13 -------- Assets/Scripts/Fishing/Player/Player.State.cs | 2 ++ Assets/Scripts/Fishing/Player/PlayerFSM.cs | 32 ------------------- .../Scripts/Fishing/Player/PlayerFSM.cs.meta | 3 -- 4 files changed, 2 insertions(+), 48 deletions(-) delete mode 100644 Assets/Scripts/Fishing/Player/PlayerFSM.cs delete mode 100644 Assets/Scripts/Fishing/Player/PlayerFSM.cs.meta diff --git a/Assets/ResRaw/Prefabs/Player/Player.prefab b/Assets/ResRaw/Prefabs/Player/Player.prefab index 5b3e855a4..537fd4f7f 100644 --- a/Assets/ResRaw/Prefabs/Player/Player.prefab +++ b/Assets/ResRaw/Prefabs/Player/Player.prefab @@ -172,7 +172,6 @@ GameObject: - component: {fileID: 2059248182290203691} - component: {fileID: 8101446342893690422} - component: {fileID: 2923025939212586282} - - component: {fileID: 644643694351368293} m_Layer: 14 m_Name: Player m_TagString: Untagged @@ -382,18 +381,6 @@ MonoBehaviour: _standingDownwardForceScale: 1 _camera: {fileID: 0} 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 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/Fishing/Player/Player.State.cs b/Assets/Scripts/Fishing/Player/Player.State.cs index f27fcfa74..e55b3079f 100644 --- a/Assets/Scripts/Fishing/Player/Player.State.cs +++ b/Assets/Scripts/Fishing/Player/Player.State.cs @@ -37,6 +37,8 @@ namespace NBF { playerStageView.Init(this); } + + ChangeState(PlayerState.Idle); } public void UpdateState() diff --git a/Assets/Scripts/Fishing/Player/PlayerFSM.cs b/Assets/Scripts/Fishing/Player/PlayerFSM.cs deleted file mode 100644 index 57ff90412..000000000 --- a/Assets/Scripts/Fishing/Player/PlayerFSM.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace NBF -{ - public class PlayerFSM : PlayerMonoBehaviour - { - private readonly Dictionary _stageViews = - new Dictionary(); - - 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(); - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Fishing/Player/PlayerFSM.cs.meta b/Assets/Scripts/Fishing/Player/PlayerFSM.cs.meta deleted file mode 100644 index 694c8c6c1..000000000 --- a/Assets/Scripts/Fishing/Player/PlayerFSM.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: df8de819db7747ddad97ff39505814a4 -timeCreated: 1777454838 \ No newline at end of file