完成4种基础ai

This commit is contained in:
2024-10-17 00:46:27 +08:00
parent 4920837ed7
commit cdd391ca36
74 changed files with 1094 additions and 4449 deletions

View File

@@ -0,0 +1,25 @@
using Game.Component.FsmMonoData;
namespace Game.Component.EnemyFSM_AI
{
public class PathWalk : EnemyFSMState
{
private WalkPathGroup _walkPathGroup;
public override void OnEnter ()
{
this.Entity.UpdateSpeedState (false);
this._walkPathGroup = this.Entity.GetComponent<WalkPathGroup> ();
this._walkPathGroup.InitTarget (this.Entity.transform.position);
this.SetAiTarget (this._walkPathGroup.CurTarget);
}
public override void OnUpdate ()
{
if (this._walkPathGroup.CheckNextNode (this.Entity.transform.position))
{
this.SetAiTarget (this._walkPathGroup.CurTarget);
}
}
}
}