Ejemplo n.º 1
0
 public void PlayScene(AvatarToPlayerNotifications notifications)
 {
     Debug.Log($"PlayScene! {name} resuming: {isResuming} {Time.time}");
     DebugUtilities.Assert(notifications != null, "Player notifications can not be null");
     playerNotifications = notifications;
     if (fadeAtStart)
     {
         fadeInOut.FadeOut(fadeOutTime);
         fadeOutDoneAt = Time.time + fadeOutTime;
     }
     else
     {
         fadeOutDoneAt = Time.time;
     }
 }
Ejemplo n.º 2
0
    IEnumerator Presentation()
    {
        yield return(new WaitForSeconds(2f));

        Flash.FadeOut();

        yield return(new WaitUntil(() => Flash.HasFinishedFade));

        yield return(new WaitForSeconds(2f));

        MMAyALogo.FadeOut();
        MMayABg.FadeOut();

        yield return(new WaitUntil(() => MMAyALogo.HasFinishedFade));

        yield return(new WaitForSeconds(2f));

        AncestralGods.FadeOut();

        yield return(new WaitUntil(() => AncestralGods.HasFinishedFade));

        yield return(new WaitForSeconds(3f));

        FlashToGame.FadeIn();

        yield return(new WaitUntil(() => FlashToGame.HasFinishedFade));

        SceneManager.LoadScene("BaseScene");
    }
Ejemplo n.º 3
0
    IEnumerator Wait()
    {
        yield return(new WaitForSeconds(delayToStart));

        if (theGameObject.GetComponent <FadeInFadeOut>() != null)
        {
            theGameObject.GetComponent <FadeInFadeOut>().FadeIn();

            yield return(new WaitForSeconds(delayToFadeOut));

            theGameObject.GetComponent <FadeInFadeOut>().FadeOut();
        }
        else
        {
            FadeInFadeOut fd = theGameObject.AddComponent <FadeInFadeOut>();
            fd.gameObjectsToFade    = new Image[1];
            fd.gameObjectsToFade[0] = theGameObject.GetComponent <Image>();
            fd.fadeTime             = delayToFadeOut;
            fd.maxAlpha             = 1f;
            fd.FadeIn();

            yield return(new WaitForSeconds(delayToFadeOut));

            fd.FadeOut();
        }
    }
    private IEnumerator Flow()
    {
        while (true)
        {
            TimeToCloseText += Time.deltaTime;

            if (TimeToCloseText >= 6)
            {
                FixedProblemText.SetActive(false);
            }

            if (Input.GetKeyDown(KeyCode.F) && FadeInFadeOut.CanGoToWork && !FadeInFadeOut.IsFading && FixedProblem)
            {
                TimerController.StopTimer();
                CashManager.gameObject.SetActive(false);

                FixedProblemText.SetActive(false);
                StartCoroutine(FadeInFadeOut.FadeOut());
                MoneyFromWorkText.GetComponent <Text>().text = "You Have Gone And Did Them Worksess, You Got 100$ !!";
                yield return(new WaitForSeconds(1f));

                MoneyFromWorkText.SetActive(true);
                yield return(new WaitForSeconds(3f));

                MoneyFromWorkText.SetActive(false);
                yield return(new WaitForSeconds(1f));


                TimerController.ResetTime();
                CashManager.gameObject.SetActive(true);
                StartCoroutine(RandomaizeGame());
                StartCoroutine(FadeInFadeOut.FadeIn());
                CashManager.AddMoney(100);
            }


            if (PlayerTarnsform.position.y < -10)
            {
                PlayerTarnsform.position = new Vector3(1.62f, 1.16f, 1.834f);
            }

            yield return(null);
        }
    }
Ejemplo n.º 5
0
    void OnLevelFinishedLoading(Scene scene, LoadSceneMode mode)
    {
        if (scene.name == "Present" && _firstPresentLoad)
        {
            _firstPresentLoad = false;
            _waitForTitle     = false;
        }

        UIFlash.FadeOut();
    }
Ejemplo n.º 6
0
    IEnumerator ShowGoodNews()
    {
        GoodNewsBG.FadeIn();
        GoodNewsText.FadeIn();

        yield return(new WaitUntil(() => GoodNewsText.HasFinishedFade));

        yield return(new WaitForSeconds(2f));

        GoodNewsBG.FadeOut();
        GoodNewsText.FadeOut();
    }
Ejemplo n.º 7
0
    void OnMouseUp()
    {
        hasPlayedClick = false;

        if (DataHolder.allowInteractions)        // && interactionsAllowed)
        {
            if (fadedIn)
            {
                fadedIn = false;
                drawerFade.FadeOut();
            }

            drawerSprite.Display(0);

            GameObject.FindObjectOfType <ListenerManager>().OnDrop(gameObject);
            this.transform.localPosition = originalLocation;
        }
    }
Ejemplo n.º 8
0
    void Update()
    {
        if (!isActing)
        {
            return;
        }

        if (!isFading && animate[cameraAnimation.name].length - animate[cameraAnimation.name].time < fadeDuration)
        {
            isFading = true;
            fadeInFadeOut.FadeOut(fadeDuration);
        }

        if (!animate.IsPlaying(cameraAnimation.name) || skip)
        {
            OnAnimationDone();
            fadeInFadeOut.FadeIn(fadeDuration);
        }
    }
Ejemplo n.º 9
0
        public void ApplyFadeOut(int fadeOutMs)
        {
            Working(true);
            DynamicVars.projectSettings.fxEditor.fadeSettings.FadeOut = fadeOutMs;
            bool valid = false;

            fadeout = new FadeInFadeOut((int)DynamicVars.wavOps.GetWaveFile.Format.SamplesPerSec,
                                        DynamicVars.wavOps.GetWaveFile, fadeOutMs, out valid);
            if (!valid)
            {
                MessageBox.Show("Opps! Parece que não é possível aplicar um fade de " + fadeOutMs + "ms neste ficheiro", "Fade demasiado longo", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
            }
            else
            {
                fadeout.FadeOut();
                DynamicVars.fxEditor.on_fxChange();
            }
            Working(false);
        }
Ejemplo n.º 10
0
    IEnumerator Wait(GameObject theGameObject)
    {
        if (theGameObject.GetComponent <FadeInFadeOut>() != null)
        {
            yield return(new WaitForSeconds(startDelay));

            theGameObject.GetComponent <FadeInFadeOut>().FadeOut(1);
        }
        else
        {
            FadeInFadeOut fd = theGameObject.AddComponent <FadeInFadeOut>();
            fd.gameObjectsToFade    = new Image[1];
            fd.gameObjectsToFade[0] = theGameObject.GetComponent <Image>();
            fd.fadeTime             = startDelay;
            fd.maxAlpha             = 1f;

            yield return(new WaitForSeconds(startDelay));

            fd.FadeOut(1);
        }
    }