/// <summary> /// Make the page interactable and tell the page to animate into the game /// Do not set isOn to true until the page animation is done /// </summary> IEnumerator RunEntrySequence() { SetAnimState(true, false); isTurningOn = true; while (!anim.GetCurrentAnimatorStateInfo(0).IsName("Entry")) { yield return(wait); } while (anim.GetCurrentAnimatorStateInfo(0).normalizedTime < 1 || anim.IsInTransition(0)) //is the animation over? { yield return(wait); } if (nextPage != PageType.None) { manager.TurnPageOn(PageType.None, nextPage, false); } OnPageEnter(); isOn = true; manager.ConfirmPageHasEntered(pageType); isTurningOn = false; SetInteractability(true); }