Пример #1
0
    public override void Enter()
    {
        CanStayArea g = GameObject.Find("CanStayArea").GetComponent <CanStayArea>();

        this.agent.MoveTo(g.RandomAPosition());
        this.agent.animController.Play_Run();
    }
Пример #2
0
    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();
    }
Пример #3
0
 void OnEnable()
 {
     area = (CanStayArea)target;
 }