Exemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        currentTime += Time.deltaTime;
        switch (state)
        {
        case State.wait:
            if (currentTime >= waitTime)
            {
                state = State.jump;
                pathFollower.Resume(isFlipped);
                spriteAnim.Resume();
                currentTime = 0;
            }
            break;

        case State.jump:
            if (currentTime >= jumpTime)
            {
                state     = State.wait;
                isFlipped = !isFlipped;
                pathFollower.Pause();
                spriteAnim.Pause();
                currentTime = 0;
            }
            break;
        }
    }
Exemplo n.º 2
0
 void NormalEnter()
 {
     angry = false;
     animator.Resume();
 }