public override void Enter() { CanStayArea g = GameObject.Find("CanStayArea").GetComponent <CanStayArea>(); this.agent.MoveTo(g.RandomAPosition()); this.agent.animController.Play_Run(); }
public override void Enter() { Debug.Log("Should Move"); //随机寻找下一个路径点 ////////////////////////////////////////////////////////////////////////// CanStayArea g = GameObject.Find("CanStayArea").GetComponent <CanStayArea>(); this.agent.MoveTo(g.RandomAPosition()); this.agent.navAgent.speed = this.agent.defaultSpeed; this.agent.animController.Play_Run(); }
void OnEnable() { area = (CanStayArea)target; }