示例#1
0
    void OnFloorClicked(Vector3 pos)
    {
        if (state == states.CHANGING_LEVEL)
        {
            return;
        }
        if (state == states.ENTERING_DOOR)
        {
            return;
        }
        if (state == states.UI_POPUP)
        {
            return;
        }

        else if (state == states.OPENING_FRUIT_NINJA)
        {
            state = states.PLAYING;
        }

        target.transform.position = pos;
        LookAtTarget(target);
        Vector3 rot = transform.localEulerAngles;

        rot.x = rot.z = 0;
        transform.localEulerAngles = rot;
        moveTo.Init(pos);
        anim.Walk();
    }
示例#2
0
    void WalkTo(Vector3 pos)
    {
        target.transform.position = pos;
        LookAtTarget(target);
        Vector3 rot = transform.localEulerAngles;

        rot.x = rot.z = 0;
        transform.localEulerAngles = rot;
        moveTo.Init(pos);
        view.characterAnimations.Walk();
    }