void StorySkipContinue() { if (storyFullyOn) { fadeTMPScript.fadeDelay = false; fadeTMPScript.FadeOut(); //storyBtn.gameObject.SetActive(false); moveClouds = true; hubScript.startHubActive = true; } if (storyAppearing) { fadeTMPScript.t = 1; titleFade.t = 1; } }
void Update() { if (slideInScript.isUp && slideInScript.introDone && !riddBtnOn) { if (clickOnEggsScript.goldenEggFound == 1) { riddleBtn.interactable = false; riddCGFadeScript.maxAlpha = 0.5f; } else { riddleBtn.interactable = true; } riddCGFadeScript.FadeIn(); riddBtnOn = true; dontCloseMenu.SetActive(true); } if (!slideInScript.isUp && riddBtnOn) { riddBtnOn = false; if (!riddCGFadeScript.hidden && !riddCGFadeScript.fadingOut) { riddCGFadeScript.FadeOut(); riddleBtn.interactable = false; } } if (slideInScript.moveDown && riddTextOn) { riddTextFadeScript.fadeDelayDur = 0f; plainGoldEggFadeScript.fadeDelayDur = 0f; riddTextFadeScript.FadeOut(); plainGoldEggFadeScript.FadeOut(); } }
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; } } }