Example #1
0
 private void SkipFadeTween()
 {
     ScriptCommandParams.FadeInfo fadeInfo = this.scriptEngine.GetFadeInfo();
     TutorialFade.FadeType        type     = (fadeInfo.type != 0) ? TutorialFade.FadeType.BLACK : TutorialFade.FadeType.WHITE;
     if (!fadeInfo.enable && this.skipMode == TutorialCommandSkip.SkipMode.NORMAL_SKIP)
     {
         this.tutorialUI.Fade.StartFade(type, false, 0f, null);
     }
 }
Example #2
0
    public IEnumerator ReproduceTutorialStatus()
    {
        TutorialCreateRestartScreen createRestartScreen = new TutorialCreateRestartScreen(this.tutorialUI);
        bool isFinishedFade = false;

        TutorialFade.FadeType fadeType = TutorialFade.FadeType.BLACK;
        if (this.tutorialStatus.fadeInfo.enable && this.tutorialStatus.fadeInfo.type == 0)
        {
            fadeType = TutorialFade.FadeType.WHITE;
        }
        this.tutorialUI.Fade.StartFade(fadeType, true, 0.3f, delegate
        {
            isFinishedFade = true;
        });
        while (!isFinishedFade)
        {
            yield return(null);
        }
        if (this.tutorialStatus.displayMask)
        {
            this.tutorialUI.MaskBlack.SetEnable(this.scriptEngine.GetMaskEnableFlag(), null, false);
        }
        yield return(AppCoroutine.Start(createRestartScreen.CreateRestartScreen(this.tutorialStatus.sceneType, this.tutorialStatus.farmBuildFacilityInfo, this.scriptEngine.GetMeatNum(), this.scriptEngine.GetDigiStoneNum(), this.scriptEngine.GetLinkPointNum(), this.tutorialStatus.expInfo, this.tutorialStatus.openUI, this.tutorialStatus.openConfirmUI, this.tutorialStatus.selectUI, this.controlToGame), false));

        this.CreateScreenParts(createRestartScreen);
        yield return(AppCoroutine.Start(createRestartScreen.CheckFinish(), false));

        if (!this.tutorialStatus.fadeInfo.enable)
        {
            isFinishedFade = false;
            this.tutorialUI.Fade.StartFade(fadeType, false, 0.5f, delegate
            {
                isFinishedFade = true;
            });
            while (!isFinishedFade)
            {
                yield return(null);
            }
        }
        yield break;
    }
    public void StartFade(TutorialFade.FadeType type, bool enable, float time, Action completed)
    {
        Color color = Color.black;

        if (type == TutorialFade.FadeType.WHITE)
        {
            color = Color.white;
        }
        if (enable)
        {
            color.a = 1f;
        }
        else
        {
            color.a = 0f;
        }
        UISprite component = base.GetComponent <UISprite>();

        component.color          = color;
        this.finishedTweenAction = completed;
        TweenAlpha component2 = base.GetComponent <TweenAlpha>();

        component2.duration = time;
        if (enable)
        {
            component2.PlayForward();
            if (0f >= time)
            {
                component2.tweenFactor = 1f;
            }
        }
        else
        {
            component2.PlayReverse();
            if (0f >= time)
            {
                component2.tweenFactor = 0f;
            }
        }
    }
Example #4
0
 public void DisplayFadeOut(int type)
 {
     TutorialFade.FadeType type2 = (type != 0) ? TutorialFade.FadeType.BLACK : TutorialFade.FadeType.WHITE;
     this.tutorialUI.Fade.StartFade(type2, true, 0f, null);
 }
Example #5
0
 private void WaitFade()
 {
     ScriptCommandParams.FadeInfo fadeInfo = this.scriptEngine.GetFadeInfo();
     TutorialFade.FadeType        type     = (fadeInfo.type != 0) ? TutorialFade.FadeType.BLACK : TutorialFade.FadeType.WHITE;
     this.tutorialUI.Fade.StartFade(type, fadeInfo.enable, fadeInfo.time, new Action(base.ResumeScript));
 }