You've already forked taptap2024_GJ_chidouren
26 lines
816 B
C#
26 lines
816 B
C#
using Game.Component.FsmMonoData;
|
|
|
|
namespace Game.Component.EnemyFSM_AI
|
|
{
|
|
public class PathWalk : EnemyFSMState
|
|
{
|
|
private WalkPathGroup _walkPathGroup;
|
|
|
|
public override void OnEnter ()
|
|
{
|
|
this.Entity.AnimState.SetState (EnemyAnimStateType.Walk);
|
|
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);
|
|
}
|
|
}
|
|
}
|
|
} |