void PreSceneFadeOutDone()
    {
        Debug.Log("pre scene fade is done");
        PrepareScene();
        PlayNextLine();

        if (fadeAtStart)
        {
            fadeInOut.FadeIn(fadeInTime);
        }
    }
Example #2
0
    protected override void Act()
    {
        transform.rotation      = new Quaternion();
        transform.position      = new Vector3();
        instantiatedObject      = Instantiate(new GameObject(), new Vector3(), new Quaternion()) as GameObject;
        instantiatedObject.name = "ActorCameraAnimation_" + name;

        fadeInFadeOut = instantiatedObject.AddComponent <FadeInFadeOut>();
        //cameraToAnimate.cullingMask = cameraCullingMask;
        //cameraToAnimate.farClipPlane = 500;
        //cameraToAnimate.depth = cameraDepth;
        animate = instantiatedObject.AddComponent <Animation>();
        var cameraToAnimate = instantiatedObject.AddComponent <LogicCameraFromGameObject>();

        animate.AddClip(cameraAnimation, cameraAnimation.name);
        animate.Play(cameraAnimation.name);
        animate[cameraAnimation.name].enabled = true;

        cameraToAnimateHandle = actingInScene.GetPlayerNotifications().AddCameraToStack(cameraToAnimate, "ActorCameraAnimation");
        ChildListenerToCameraAnimation();

        isActing = true;
        if (fadeIn)
        {
            fadeInFadeOut.FadeIn(fadeDuration);
        }
    }
Example #3
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");
    }
Example #4
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();
        }
    }
Example #5
0
    void OnMouseDown()
    {
        //originalLocation = this.transform.position;

        if (DataHolder.allowInteractions)        // && interactionsAllowed)
        {
            if (!fadedIn)
            {
                fadedIn = true;
                drawerFade.FadeIn();
            }

            drawerSprite.Display(1);

            if (onClick.Length != 0 && !hasPlayedClick)
            {
                hasPlayedClick = true;
                int randomClip = UnityEngine.Random.Range(0, onClick.Length);
                source.clip = onClick[randomClip];
                source.Play();
            }

            screenPoint = Camera.main.WorldToScreenPoint(gameObject.transform.position);
            offset      = gameObject.transform.position - Camera.main.ScreenToWorldPoint(new Vector3(Input.mousePosition.x, Input.mousePosition.y, screenPoint.z));
        }
    }
Example #6
0
    IEnumerator Reset()
    {
        GetComponent <FadeInFadeOut>().FadeIn();
        WWW.FadeIn();

        yield return(new WaitForSeconds(10f));

        ButtonReset.SetActive(true);
    }
    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);
        }
    }
 void Start()
 {
     fadeinOut = gameObject.AddComponent <FadeInFadeOut>();
     fadeinOut.FadeIn(0.5f);
     ownAnimation = GetComponent <Animation>();
     ownAnimation.Play();
     if (GetComponent <AudioSource>() != null)
     {
         GetComponent <AudioSource>().Play();
     }
     isInitiated = true;
 }
Example #9
0
    IEnumerator ShowGoodNews()
    {
        GoodNewsBG.FadeIn();
        GoodNewsText.FadeIn();

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

        yield return(new WaitForSeconds(2f));

        GoodNewsBG.FadeOut();
        GoodNewsText.FadeOut();
    }
    IEnumerator FadeInSquence()
    {
        yield return(new WaitForSeconds(fadePaddingTimeBefore));

        // Fade in Logo (Background is allready visible)
        logoFader.FadeIn();
        // Wait for as long as the Splashscreen should show
        yield return(new WaitForSeconds(displayTime));

        // Fade out Logo
        StartCoroutine(logoFader.FadeOutOverTime());
        // Wait for the Logo to Fade out
        yield return(new WaitForSeconds(logoFader.fadeOutTime + fadePaddingTimeAfter));

        // Fade out Background, and when done destroy this
        StartCoroutine(backgroundFader.FadeOutAndCallBack(DestroyThisObject));
        yield return(null);
    }
Example #11
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);
        }
    }
Example #12
0
        public void ApplyFadeIn(int fadeInMs)
        {
            Working(true);
            DynamicVars.projectSettings.fxEditor.fadeSettings.FadeIn = fadeInMs;
            bool valid = false;

            fadein = new FadeInFadeOut((int)DynamicVars.wavOps.GetWaveFile.Format.SamplesPerSec,
                                       DynamicVars.wavOps.GetWaveFile, fadeInMs, out valid);
            if (!valid)
            {
                MessageBox.Show("Opps! Parece que não é possível aplicar um fade de " + fadeInMs + "ms neste ficheiro", "Fade demasiado longo", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
            }
            else
            {
                fadein.FadeIn();
                DynamicVars.fxEditor.on_fxChange();
            }
            Working(false);
        }
    IEnumerator PresentationSequence()
    {
        //PressKeyToStartButton.SetActive(false);

        SceneManager.LoadSceneAsync("Present", LoadSceneMode.Additive);

        yield return(new WaitWhile(() => _waitForTitle));

        yield return(new WaitForSeconds(3f));

        Title.FadeIn();

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

        PressKeyToContinueText.FadeIn();

        //yield return new WaitUntil(()=>PressKeyToContinueText.HasFinishedFade);

        //PressKeyToStartButton.SetActive(true);
    }
 // Use this for initialization
 void Start()
 {
     InvokeRepeating("CheckLevel", checkTime, checkTime);
     fader.SetToBlack();
     fader.FadeIn(checkTime);
 }
Example #15
0
 void Start()
 {
     fadeInOut.FadeIn(1f);
 }