private IEnumerator DoFaderTweenFinised() { yield return((object)null); isChanging = false; if (!isOut) { faderPanel.depth = 4000; faderTweenAlpha.get_gameObject().SetActive(false); OnEnd(); } }
private IEnumerator Start() { while (!MonoBehaviourSingleton <UIManager> .IsValid() || MonoBehaviourSingleton <UIManager> .I.isLoading) { yield return((object)null); } faderPanel = MonoBehaviourSingleton <UIManager> .I.faderPanel; faderTexture = MonoBehaviourSingleton <UIManager> .I.system.GetCtrl(UIManager.SYSTEM.FADER).GetComponent <UITexture>(); faderSprite = MonoBehaviourSingleton <UIManager> .I.system.GetCtrl(UIManager.SYSTEM.FADER).GetComponent <UISprite>(); faderTweenAlpha = MonoBehaviourSingleton <UIManager> .I.system.GetCtrl(UIManager.SYSTEM.FADER).GetComponent <TweenAlpha>(); faderTweenAlpha.SetOnFinished(new EventDelegate(OnFaderTweenFinised)); faderTweenAlpha.get_gameObject().SetActive(false); }