예제 #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
파일: StateMove.cs 프로젝트: zhaocg/Scripts
    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;
 }