完成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 UnityEngine;
namespace Game.Component.EnemyFSM_AI
{
public class FollowDuration : EnemyFSMState
{
private AttackTimer _attackTimer;
public override void OnEnter ()
{
this.Entity.UpdateSpeedState (true);
this._attackTimer = this.Entity.GetComponent<AttackTimer> ();
this._attackTimer.StartAttack (this.Entity.EndAttack);
}
public override void OnUpdate ()
{
if (this._attackTimer.IsRunning)
{
Debug.Log ("开始追逐!");
SetAiTarget (MapContent.Instance.PlayerPosition);
}
}
}
}