void AnimEventOutroStart() { for (int i = GUIMenu.shared().menuStack.Count - 2; i >= 0; i--) { BaseMenu b = GUIMenu.shared().menuStack[i]; Vector3 targetScale = Vector3.one; if (i == GUIMenu.shared().menuStack.Count - 2) { targetScale = b.transform.localScale + b.firstScaleDelta; } else { targetScale = b.transform.localScale + b.stackScaleDelta; } iTween.ScaleTo(b.gameObject, iTween.Hash("scale", targetScale, "time", outroTime, "ignoretimescale", (Time.timeScale == 0f), "easetype", "easeInOutSmoothBreak")); float currentAlpha = b.GetComponent <CanvasGroup>().alpha; float targetAlpha = currentAlpha * 2; iTween.ValueTo(b.gameObject, iTween.Hash("from", currentAlpha, "to", targetAlpha, "time", outroTime, "onupdate", "AnimUpdate", "onupdatetarget", b.gameObject, "ignoretimescale", (Time.timeScale == 0f), "easetype", "easeInOutSine")); } if (OnOutroStart != null) { OnOutroStart(); } }