public void GameOver() { if (GameIsOver == false) { GameIsOver = true; Debug.Log("GameIsOver!!!!"); End.gameObject.SetActive(true); EndVignette.CheckCanvasGroup(); EndVignette.canvasGroup.alpha = 0.0f; LeanTween.alpha(EndVignette.gameObject, 1.0f, 0.64f); Vector3 pos = EndLogo.rectTransform.anchoredPosition; EndLogo.rectTransform.anchoredPosition = new Vector3(pos.x, pos.y + 1000, pos.z); LeanTween.moveLocalY(EndLogo.rectTransform, pos.y, 2.0f).setEase(LeanTweenType.easeInOutBounce); EndScoreField.CheckCanvasGroup(); EndScoreField.canvasGroup.alpha = 0.0f; LeanTween.alpha(EndScoreField.gameObject, 1.0f, 0.64f); EndScoreField.text.text = PlanetUnityStyle.ReplaceStyleTags(string.Format("[b3]Score:[/b3] [p3]{0}[/p3]", PlayerScore)); ClickToTryAgain.CheckCanvasGroup(); LeanTween.value(ClickToTryAgain.gameObject, (t, obj) => { ClickToTryAgain.canvasGroup.alpha = t; }, 0.4f, 1.0f, 0.47f).setEase(LeanTweenType.easeOutCubic).setLoopPingPong(); } }
public void EndIntro() { BlackCover.unload(); Vignette.CheckCanvasGroup(); Vignette.canvasGroup.alpha = 1.0f; LeanTween.alpha(Vignette.gameObject, 0.0f, 0.44f).setDestroyOnComplete(true); }
public void Start() { ClickToStart.CheckCanvasGroup(); LeanTween.value(ClickToStart.gameObject, (t, obj) => { ClickToStart.canvasGroup.alpha = t; }, 0.4f, 1.0f, 0.47f).setEase(LeanTweenType.easeOutCubic).setLoopPingPong(); DontDestroyOnLoad(Music); }
public void StartIntro(Hashtable args) { PUClearButton sender = args ["sender"] as PUClearButton; sender.unload(); ClickToStart.unload(); Logo.CheckCanvasGroup(); LeanTween.alpha(Logo.gameObject, 0.0f, 0.66f); // Play intro animation / story Vignette.CheckCanvasGroup(); Vignette.canvasGroup.alpha = 0.0f; Vignette.gameObject.SetActive(true); LeanTween.alpha(Vignette.gameObject, 1.0f, 2.0f); LeanTween.delayedCall(1.0f, () => { Ringtone.GetComponent <AudioSource>().Play(); }); float t = 2.0f; LeanTween.delayedCall(t, () => { BubbleSwitcher.SwitchTo(0); }); t += 2.0f; LeanTween.delayedCall(t, () => { BubbleSwitcher.SwitchTo(1); }); t += 5.0f; LeanTween.delayedCall(t, () => { BubbleSwitcher.SwitchTo(2); SkipButton.gameObject.SetActive(true); }); t += 3.0f; LeanTween.delayedCall(t, () => { BubbleSwitcher.SwitchTo(3); }); t += 3.0f; LeanTween.delayedCall(t, () => { BubbleSwitcher.SwitchTo(4); }); t += 3.0f; LeanTween.delayedCall(t, () => { BubbleSwitcher.SwitchTo(5); }); t += 3.0f; LeanTween.delayedCall(t, () => { BubbleSwitcher.SwitchTo(6); }); t += 3.0f; LeanTween.delayedCall(t, () => { BubbleSwitcher.SwitchTo(7); }); t += 3.0f; LeanTween.delayedCall(t, () => { BubbleSwitcher.SwitchTo(8); }); t += 3.0f; LeanTween.delayedCall(t, () => { SkipIntro(); }); }