diff --git a/DungeonShooting_Godot/src/framework/activity/components/StateBase.cs b/DungeonShooting_Godot/src/framework/activity/components/StateBase.cs index c4d2d17..da0095a 100644 --- a/DungeonShooting_Godot/src/framework/activity/components/StateBase.cs +++ b/DungeonShooting_Godot/src/framework/activity/components/StateBase.cs @@ -41,9 +41,9 @@ } /// - /// 如果当前状态已被激活, 物理帧每帧更新 + /// 如果当前状态已被激活, 帧每帧更新 /// - public virtual void PhysicsProcess(float delta) + public virtual void Process(float delta) { } diff --git a/DungeonShooting_Godot/src/framework/activity/components/StateController.cs b/DungeonShooting_Godot/src/framework/activity/components/StateController.cs index 8344358..59ab805 100644 --- a/DungeonShooting_Godot/src/framework/activity/components/StateController.cs +++ b/DungeonShooting_Godot/src/framework/activity/components/StateController.cs @@ -27,16 +27,16 @@ /// private bool _isChangeState; - public override void PhysicsProcess(float delta) + public override void Process(float delta) { _isChangeState = false; if (CurrStateBase != null) { - CurrStateBase.PhysicsProcess(delta); - //判断当前帧是否有改变的状态, 如果有, 则重新调用 PhysicsProcess() 方法 + CurrStateBase.Process(delta); + //判断当前帧是否有改变的状态, 如果有, 则重新调用 Process() 方法 if (_isChangeState) { - PhysicsProcess(delta); + Process(delta); } } } diff --git a/DungeonShooting_Godot/src/game/role/enemy/Enemy.cs b/DungeonShooting_Godot/src/game/role/enemy/Enemy.cs index ef19fef..437663d 100644 --- a/DungeonShooting_Godot/src/game/role/enemy/Enemy.cs +++ b/DungeonShooting_Godot/src/game/role/enemy/Enemy.cs @@ -136,9 +136,9 @@ Destroy(); } - protected override void PhysicsProcess(float delta) + protected override void Process(float delta) { - base.PhysicsProcess(delta); + base.Process(delta); _enemyAttackTimer -= delta; EnemyPickUpWeapon(); diff --git a/DungeonShooting_Godot/src/game/role/enemy/state/AiFindAmmoState.cs b/DungeonShooting_Godot/src/game/role/enemy/state/AiFindAmmoState.cs index b325bc5..c0a88cf 100644 --- a/DungeonShooting_Godot/src/game/role/enemy/state/AiFindAmmoState.cs +++ b/DungeonShooting_Godot/src/game/role/enemy/state/AiFindAmmoState.cs @@ -37,7 +37,7 @@ _target.SetSign(SignNames.AiFindWeaponSign, Master); } - public override void PhysicsProcess(float delta) + public override void Process(float delta) { if (!Master.IsAllWeaponTotalAmmoEmpty()) //已经有弹药了 { diff --git a/DungeonShooting_Godot/src/game/role/enemy/state/AiFollowUpState.cs b/DungeonShooting_Godot/src/game/role/enemy/state/AiFollowUpState.cs index dd7b002..c3082d3 100644 --- a/DungeonShooting_Godot/src/game/role/enemy/state/AiFollowUpState.cs +++ b/DungeonShooting_Godot/src/game/role/enemy/state/AiFollowUpState.cs @@ -26,7 +26,7 @@ IsInView = true; } - public override void PhysicsProcess(float delta) + public override void Process(float delta) { //先检查弹药是否打光 if (Master.IsAllWeaponTotalAmmoEmpty()) diff --git a/DungeonShooting_Godot/src/game/role/enemy/state/AiLeaveForState.cs b/DungeonShooting_Godot/src/game/role/enemy/state/AiLeaveForState.cs index 1245c70..80766a7 100644 --- a/DungeonShooting_Godot/src/game/role/enemy/state/AiLeaveForState.cs +++ b/DungeonShooting_Godot/src/game/role/enemy/state/AiLeaveForState.cs @@ -38,7 +38,7 @@ } } - public override void PhysicsProcess(float delta) + public override void Process(float delta) { //这个状态下不会有攻击事件, 所以没必要每一帧检查是否弹药耗尽 diff --git a/DungeonShooting_Godot/src/game/role/enemy/state/AiNormalState.cs b/DungeonShooting_Godot/src/game/role/enemy/state/AiNormalState.cs index 434ee38..6089ec9 100644 --- a/DungeonShooting_Godot/src/game/role/enemy/state/AiNormalState.cs +++ b/DungeonShooting_Godot/src/game/role/enemy/state/AiNormalState.cs @@ -39,7 +39,7 @@ _moveFlag = false; } - public override void PhysicsProcess(float delta) + public override void Process(float delta) { //其他敌人发现玩家 if (Enemy.IsFindTarget) diff --git a/DungeonShooting_Godot/src/game/role/enemy/state/AiProbeState.cs b/DungeonShooting_Godot/src/game/role/enemy/state/AiProbeState.cs index 6dc14dc..b3030ca 100644 --- a/DungeonShooting_Godot/src/game/role/enemy/state/AiProbeState.cs +++ b/DungeonShooting_Godot/src/game/role/enemy/state/AiProbeState.cs @@ -8,7 +8,7 @@ { } - public override void PhysicsProcess(float delta) + public override void Process(float delta) { //其他敌人发现玩家 if (Enemy.IsFindTarget) diff --git a/DungeonShooting_Godot/src/game/role/enemy/state/AiSurroundState.cs b/DungeonShooting_Godot/src/game/role/enemy/state/AiSurroundState.cs index de77bd2..a777251 100644 --- a/DungeonShooting_Godot/src/game/role/enemy/state/AiSurroundState.cs +++ b/DungeonShooting_Godot/src/game/role/enemy/state/AiSurroundState.cs @@ -33,7 +33,7 @@ _moveFlag = false; } - public override void PhysicsProcess(float delta) + public override void Process(float delta) { //先检查弹药是否打光 if (Master.IsAllWeaponTotalAmmoEmpty()) diff --git a/DungeonShooting_Godot/src/game/role/enemy/state/AiTailAfterState.cs b/DungeonShooting_Godot/src/game/role/enemy/state/AiTailAfterState.cs index 7d92d9f..8d3d507 100644 --- a/DungeonShooting_Godot/src/game/role/enemy/state/AiTailAfterState.cs +++ b/DungeonShooting_Godot/src/game/role/enemy/state/AiTailAfterState.cs @@ -40,7 +40,7 @@ } } - public override void PhysicsProcess(float delta) + public override void Process(float delta) { //这个状态下不会有攻击事件, 所以没必要每一帧检查是否弹药耗尽