You've already forked taptap2024_GJ_chidouren
25 lines
672 B
C#
25 lines
672 B
C#
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);
|
|
}
|
|
}
|
|
}
|
|
} |