Пример #1
0
 void StoryTextAppears()
 {
     storyAppearing = true;
     //storyTMP.gameObject.SetActive(true);
     fadeTMPScript.FadeIn();
     skipFrame = true;
 }
Пример #2
0
 void SetUpTitle()
 {
     bannerTitle.SetActive(true);
     closedLock.gameObject.SetActive(true);
     comingSoonTitle.SetActive(false);
     bannerTitle.GetComponent <FadeInOutImage>().FadeIn();
     FadeInOutTMP[] myFade = bannerTitle.GetComponentsInChildren <FadeInOutTMP>();
     foreach (FadeInOutTMP fade in myFade)
     {
         fade.FadeIn();
     }
     amntReqFadeScript.FadeIn();
     closedLock.gameObject.GetComponent <FadeInOutImage>().FadeIn();
     backColorFadeScript.gameObject.SetActive(true);
     backColorFadeScript.FadeIn();
     settingUp = true;
     // Debug.Log("I'm here  setup should be true");
 }
Пример #3
0
 public void CinematicButton()
 {
     if (comingSoonTit)
     {
         float delay = openLock.gameObject.GetComponent <FadeInOutImage>().fadeDuration;
         comingSoonTitle.SetActive(true);
         FadeInOutTMP   textFade = comingSoonTitle.GetComponentInChildren <FadeInOutTMP>();
         FadeInOutImage imgFade  = comingSoonTitle.GetComponent <FadeInOutImage>();
         textFade.FadeIn();
         imgFade.FadeIn();
     }
     else
     {
         foreach (FadeInOutImage fadeScript in playCinematicFadeScripts)
         {
             fadeScript.FadeIn();
         }
     }
 }
    public void ShowRiddleText()
    {
        int random = Random.Range(0, riddleHints.Count);

        riddleHints[random].SetActive(true);
        riddleCurntActive = riddleHints[random];

        riddTextFadeScript.fadeDelayDur     = riddCGFadeScript.fadeDuration;
        plainGoldEggFadeScript.fadeDelayDur = riddCGFadeScript.fadeDuration;
        riddTextFadeScript.FadeIn();
        plainGoldEggFadeScript.FadeIn();

        riddTextOn = true;

        dontCloseMenu.SetActive(false);

        hintCGFadeScript.FadeOut();
        hintBtn.interactable = false;
        riddCGFadeScript.FadeOut();
        riddleBtn.interactable = false;
    }
    void Update()
    {
        if (moveUp)
        {
            lerp += Time.deltaTime / moveDur;
            helperBird.transform.position = Vector3.Lerp(hiddenTrans.position, shownTrans.position, moveCurve.Evaluate(lerp));

            if (!audioBirdPop)
            {
                //AUDIO SWOOSH BIRD
                audioHelperBirdScript.youDidItSnd();
                audioBirdPop = true;
            }

            if (lerp >= 1f)
            {
                helperBird.transform.position = shownTrans.position;
                lerp         = 0f;
                moveUp       = false;
                waitForBubIn = true;
                textBubFadeScript.FadeIn();
                textBubPointerFadeScript.FadeIn();
                AdjustBubSize(bubSizeA);
            }
        }
        if (waitForBubIn && textBubFadeScript.shown)
        {
            congratsTextAnim.SetTrigger("PopIn");
            congratsTextFadeScript.FadeIn();
            waitForBubIn = false;

            //AUDIO BIRD HELP SOUND
            audioHelperBirdScript.birdHelpSound();
        }
        if (waitForConTxtOut)
        {
            if (congratsTextFadeScript.shown)
            {
                congratsTextFadeScript.FadeOut();
            }
            if (congratsTextFadeScript.hidden && counterCGFadeScript.hidden)
            {
                AdjustBubSize(bubSizeB);
            }
            if (congratsTextFadeScript.hidden && counterCGFadeScript.hidden && curBubSize == bubSizeB)
            {
                counterCGFadeScript.FadeIn();
                waitForConTxtOut = false;

                //AUDIO BIRD HELP SOUND
                audioHelperBirdScript.birdHelpSound();
            }
        }
        if (waitForCountOut)
        {
            if (counterCGFadeScript.shown)
            {
                counterCGFadeScript.FadeOut();
            }
            if (counterCGFadeScript.hidden && backBtnCGFadeScript.hidden)
            {
                AdjustBubSize(bubSizeC);
            }
            if (counterCGFadeScript.hidden && backBtnCGFadeScript.hidden && curBubSize == bubSizeC)
            {
                backBtnCGFadeScript.FadeIn();
                waitForConTxtOut = false;


                //AUDIO BIRD HELP SOUND
                audioHelperBirdScript.birdHelpSound();
            }
        }

        if (adjustingBubSize)
        {
            bubLerp               += Time.deltaTime / bubAdjustDur;
            curBubSize             = Mathf.Lerp(prevBubSize, newBubSize, bubLerp);
            textBubSpriteRend.size = new Vector2(curBubSize, textBubSpriteRend.size.y);
            if (bubLerp >= 1f)
            {
                bubLerp          = 0f;
                curBubSize       = newBubSize;
                adjustingBubSize = false;
            }
        }
    }