// MoveIn all primary buttons IEnumerator MoveInPrimaryButtons() { yield return(new WaitForSeconds(1.0f)); // MoveIn all primary buttons m_CenterButtons.MoveIn(GSui.eGUIMove.SelfAndChildren); // Enable all scene switch buttons StartCoroutine(EnableAllDemoButtons()); }
// ######################################## // MoveIn/MoveOut functions // ######################################## #region MoveIn/MoveOut // MoveIn m_Title1 and m_Title2 IEnumerator MoveInTitleGameObjects() { yield return(new WaitForSeconds(1.0f)); // MoveIn m_Title1 and m_Title2 m_Title1.MoveIn(GSui.eGUIMove.Self); m_Title2.MoveIn(GSui.eGUIMove.Self); // MoveIn m_Dialog StartCoroutine(ShowDialog()); }
// ######################################## // MoveIn/MoveOut functions // ######################################## #region MoveIn/MoveOut // MoveIn m_Title1 and m_Title2 IEnumerator MoveInTitleGameObjects() { yield return(new WaitForSeconds(1.0f)); // MoveIn m_Title1 and m_Title2 m_Title1.MoveIn(GSui.eGUIMove.Self); m_Title2.MoveIn(GSui.eGUIMove.Self); // MoveIn all primary buttons StartCoroutine(MoveInPrimaryButtons()); }
// MoveIn all primary buttons IEnumerator MoveInPrimaryButtons() { yield return(new WaitForSeconds(1.0f)); // MoveIn all primary buttons m_TopLeft_A.MoveIn(GSui.eGUIMove.Self); m_BottomLeft_A.MoveIn(GSui.eGUIMove.Self); m_RightBar_A.MoveIn(GSui.eGUIMove.Self); // Enable all scene switch buttons StartCoroutine(EnableAllDemoButtons()); }
// ######################################## // Functions // ######################################## #region Functions IEnumerator ShowLevelSelect() { // Creates a yield instruction to wait for a given number of seconds // http://docs.unity3d.com/400/Documentation/ScriptReference/WaitForSeconds.WaitForSeconds.html yield return(new WaitForSeconds(0.25f)); // Play MoveIn animation m_Banner.MoveIn(); // Update Loading progress bar. StartCoroutine(ShowPage0()); }
// Start is called on the frame when a script is enabled just before any of the Update methods is called the first time. // http://docs.unity3d.com/ScriptReference/MonoBehaviour.Start.html void Start() { // MoveIn m_TopBar and m_BottomBar m_TopBar.MoveIn(GSui.eGUIMove.SelfAndChildren); m_BottomBar.MoveIn(GSui.eGUIMove.SelfAndChildren); // MoveIn m_Title1 m_Title2 StartCoroutine(MoveInTitleGameObjects()); // Disable all scene switch buttons // http://docs.unity3d.com/Manual/script-GraphicRaycaster.html GSui.Instance.SetGraphicRaycasterEnable(m_Canvas, false); }
IEnumerator ShowQuestions() { yield return(new WaitForSeconds(0.2f)); readyImg.MoveIn(); yield return(new WaitForSeconds(1)); readyImg.MoveOut(); yield return(new WaitForSeconds(1)); OnClickQuestion(arr[qIndex]); }
// Toggle m_Button5 void ToggleButton_5() { m_Button5_IsOn = !m_Button5_IsOn; if (m_Button5_IsOn == true) { // MoveIn m_SecondaryButton5 m_SecondaryButton5.MoveIn(GSui.eGUIMove.SelfAndChildren); } else { // MoveOut m_SecondaryButton5 m_SecondaryButton5.MoveOut(GSui.eGUIMove.SelfAndChildren); } }
// Toggle BottomLeft buttons void ToggleBottomLeft() { m_BottomLeft_IsOn = !m_BottomLeft_IsOn; if (m_BottomLeft_IsOn == true) { // m_BottomLeft_B moves in m_BottomLeft_B.MoveIn(GSui.eGUIMove.SelfAndChildren); } else { // m_BottomLeft_B moves out m_BottomLeft_B.MoveOut(GSui.eGUIMove.SelfAndChildren); } }
public void FoldMenu() { if (MenuMoveIn) { RestartButton.MoveIn(GUIAnimSystem.eGUIMove.SelfAndChildren); HomeButton.MoveIn(GUIAnimSystem.eGUIMove.SelfAndChildren); } else { RestartButton.MoveOut(GUIAnimSystem.eGUIMove.SelfAndChildren); HomeButton.MoveOut(GUIAnimSystem.eGUIMove.SelfAndChildren); } MenuMoveIn = !MenuMoveIn; }
// Toggle m_Bar4 void ToggleBar4() { m_Bar4_IsOn = !m_Bar4_IsOn; if (m_Bar4_IsOn == true) { // m_Bar4 moves in m_Bar4.MoveIn(GSui.eGUIMove.SelfAndChildren); } else { // m_Bar4 moves out m_Bar4.MoveOut(GSui.eGUIMove.SelfAndChildren); } }
// MoveIn all primary buttons IEnumerator MoveInPrimaryButtons() { yield return(new WaitForSeconds(1.0f)); // MoveIn all primary buttons m_PrimaryButton1.MoveIn(GSui.eGUIMove.Self); m_PrimaryButton2.MoveIn(GSui.eGUIMove.Self); m_PrimaryButton3.MoveIn(GSui.eGUIMove.Self); m_PrimaryButton4.MoveIn(GSui.eGUIMove.Self); m_PrimaryButton5.MoveIn(GSui.eGUIMove.Self); // Enable all scene switch buttons StartCoroutine(EnableAllDemoButtons()); }
// ######################################## // MoveIn/MoveOut functions // ######################################## #region MoveIn/MoveOut // Move In m_Title1 and m_Title2 IEnumerator MoveInTitleGameObjects() { yield return(new WaitForSeconds(1.0f)); // Move In m_Title1 and m_Title2 m_Title1.MoveIn(GSui.eGUIMove.Self); m_Title2.MoveIn(GSui.eGUIMove.Self); // MoveIn dialogs StartCoroutine(MoveInPrimaryButtons()); // Enable all scene switch buttons // http://docs.unity3d.com/Manual/script-GraphicRaycaster.html GSui.Instance.SetGraphicRaycasterEnable(m_Canvas, true); }
// Toggle RightBar buttons void ToggleRightBar() { m_RightBar_IsOn = !m_RightBar_IsOn; if (m_RightBar_IsOn == true) { // m_RightBar_A moves out m_RightBar_A.MoveOut(GSui.eGUIMove.SelfAndChildren); // m_RightBar_B moves in m_RightBar_B.MoveIn(GSui.eGUIMove.SelfAndChildren); } else { // m_RightBar_A moves in m_RightBar_A.MoveIn(GSui.eGUIMove.SelfAndChildren); // m_RightBar_B moves out m_RightBar_B.MoveOut(GSui.eGUIMove.SelfAndChildren); } }
IEnumerator ReadyPanel() { if (!readyPanel.gameObject.activeInHierarchy) { readyPanel.gameObject.SetActive(true); } yield return(new WaitForSeconds(0.2f)); readyPanel.MoveIn(); yield return(new WaitForSeconds(1f)); readyPanel.MoveOut(); // Start generating questions StartCoroutine(PrepareQuestion()); }
public void TutorialMode_isOn() { if (PlayerPrefs.GetInt("TUTORIAL_MODE", 1) == 1) { isTutorialMode = true; welcomeTutorialPanel.MoveIn(); welcomeTutorialPanel.gameObject.transform.parent.GetComponent <Image>().enabled = true; } else { isTutorialMode = false; welcomeTutorialPanel.gameObject.SetActive(false); MCTutorial.Instance.finger.SetActive(false); } }
IEnumerator StartAnimate() { yield return(new WaitForSeconds(0.1f)); logoStart.MoveIn(); butStart.MoveIn(); if (PlayerPrefs.GetInt("PARENT_GUIDE", 0) == 0) { // Show parent guide. parentPanel.SetActive(true); parentPanel.GetComponent <GAui>().MoveIn(); blackBG.SetActive(true); } else { parentPanel.SetActive(false); } }
public void OnClickAR() { int purchase = ZPlayerPrefs.GetInt("ACTIVATED", 0); // Testing only // TestDev // LoadingARScene(); // return; if (purchase == 0) { blackBG.SetActive(true); // SceneManager.LoadScene("QRScene"); activatePanel.MoveIn(); curActivePanel = activatePanel.gameObject; } else { LoadingARScene(); } }
// Show and add +1 trophy when the player get 3 stars. IEnumerator ShowTrophy() { yield return(new WaitForSeconds(0.5f)); trophiImage.gameObject.SetActive(true); particle.SetActive(false); particle.SetActive(true); trophiImage.MoveIn(); celebrateAudioSource.clip = celebrateSound; celebrateAudioSource.Play(); yield return(new WaitForSeconds(3)); celebrateAudioSource.clip = trophyMoveOut; celebrateAudioSource.Play(); trophiImage.MoveOut(); ResetScore(); yield return(new WaitForSeconds(1f)); // Increase trophy count trophyCount++; PlayerPrefs.SetInt("LPL_TrophyCount", trophyCount); trophyCountText.text = trophyCount.ToString(); yield return(new WaitForSeconds(0.5f)); // Ask the user to start next round. //OnClickQuestion(arr[qIndex]); black.SetActive(true); continueWindow.MoveIn(); }
IEnumerator ShowArrows() { // Creates a yield instruction to wait for a given number of seconds // http://docs.unity3d.com/400/Documentation/ScriptReference/WaitForSeconds.WaitForSeconds.html yield return(new WaitForSeconds(0.5f)); m_ArrowLeft.m_ScaleIn.Delay = Random.Range(0.5f, 1.0f); m_ArrowLeft.m_ScaleIn.Time = Random.Range(0.5f, 1.0f); // Play MoveIn animation m_ArrowLeft.MoveIn(); m_ArrowRight.m_ScaleIn.Delay = Random.Range(0.5f, 1.0f); m_ArrowRight.m_ScaleIn.Time = Random.Range(0.5f, 1.0f); // Play MoveIn animation m_ArrowRight.MoveIn(); // Play MoveIn animations m_Page_0_Dot.MoveIn(); m_Page_1_Dot.MoveIn(); UpdateArrowButtons(); }
IEnumerator IncStar() { yield return(new WaitForSeconds(1.2f)); if (isCorrect) { isCorrect = false; // Increase star count stars[starCount - 1].sprite = starSpecial; starParticles[starCount - 1].SetActive(true); audioSource.clip = starSound; audioSource.Play(); // Check and reset stars. if (starCount == stars.Length) { trophyParticle.SetActive(false); trophyParticle.SetActive(true); audioSource.clip = trophySound; audioSource.Play(); trophy.transform.localPosition = new Vector2(-226, 0); if (!trophy.gameObject.activeInHierarchy) { trophy.gameObject.SetActive(true); } // Show Trophy trophy.MoveIn(); Destroy(curObject); yield return(new WaitForSeconds(1.5f)); trophy.MoveOut(); for (int i = 0; i < stars.Length; i++) { stars[i].sprite = starNormal; starParticles[i].SetActive(false); } starCount = 0; yield return(new WaitForSeconds(1)); trophyCount++; PlayerPrefs.SetInt("TrophyCount", trophyCount); trophyText.text = trophyCount.ToString(); blackBG.SetActive(true); if (!continuePanel.gameObject.activeInHierarchy) { continuePanel.gameObject.SetActive(true); } continuePanel.MoveIn(); } } }
public void GameOver() { gameOverMask.SetActive(true); gameOverGaui.gameObject.SetActive(true); gameOverGaui.MoveIn(); }