예제 #1
0
    private void pathFind()
    {
        //播放寻路动画

        anim.action.Play(anim.runAnimName);
        //寻路
        motor.PathFind();
        //如果寻路结束,将状态调整为闲置
        if (motor.PathFind() == false)
        {
            currentState = State.idle;
        }
        else
        {
            currentState = State.PathFind;
        }
    }