void Awake() { if (_instance == null) { _instance = this; } else { if (this != _instance) { Destroy(this.gameObject); } } winnerModal = GameObject.Find("Winner"); loserModal = GameObject.Find("GameOver"); pauseModal = GameObject.Find("Pause"); instance.winnerModal.SetActive(false); instance.loserModal.SetActive(false); instance.pauseModal.SetActive(false); TotalChamas = GameObject.Find("TotalChamas").GetComponent <Text>(); Timer = GameObject.Find("Tempo").GetComponent <Text>(); timeGUI = GameObject.Find("Hora").GetComponent <Text>(); }
public IEnumerator Introduction() { var MainCamera = Camera.main; if (showIntroduction) { Camera.main.enabled = false; } StartCoroutine(Caapora.instance.CharacterMovement("left", 10)); yield return(new WaitForSeconds(3f)); StartCoroutine(Caapora.instance.ShakePlayer()); yield return(new WaitForSeconds(1f)); // txtBallonConversation.instance.ActiveBallon(true); StartCoroutine(CaaporaConversation.AnimateFrase()); StartCoroutine(UIInterface.hideAndShowObject(GameObject.Find("Informacoes"), 3)); yield return(new WaitForSeconds(3f)); StartCoroutine(UIInterface.showAndHideObject(GameObject.Find("Informacoes"), 3)); StartCoroutine(UIInterface.hideAndShowObject(GameObject.Find("CanvasGUIContainer"), 7)); StartCoroutine(moverCamera("down")); yield return(new WaitForSeconds(10f)); MainCamera.enabled = true; // player.GetComponent<Animator>().SetTrigger("CaaporaIdle"); ConversationPanel.ActivePanel(true); StartCoroutine(CaaporaConversation.AnimateFrase()); }
public static void ShowObjectAPeriodOfTime(GameObject go, int seconds) { instance.StartCoroutine(UIInterface.showAndHideObject(go, seconds)); }