void Update() { var animationState = animator.GetCurrentAnimatorStateInfo(0); switch (state) { case WakeUpPlayerState.gettingOutOfBed: if (animationState.IsName("GetOutOfBed")) { state = WakeUpPlayerState.dialogue; dialogueManager.StartDialogue(); } break; case WakeUpPlayerState.leaving: if (animationState.IsName("LeaveRight")) { state = WakeUpPlayerState.finished; sceneLoader.LoadNextScene(); } break; } }
public override void DialogueEnded(DialogueManager dialogueManager) { state = WakeUpPlayerState.leaving; animator.ResetTrigger("GetOutOfBed"); animator.SetTrigger("LeaveRight"); }
public void StartScene() { animator.SetTrigger("GetOutOfBed"); state = WakeUpPlayerState.gettingOutOfBed; }