// 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; } }
void NormalEnter() { angry = false; animator.Resume(); }