private void OnTriggerEnter(Collider other) { Destroy(gameObject); pauseButton.SetActive(false); BuiltButton.SetActive(false); Gameover.SetActive(true); }
void ActionOnStates() { switch (m_states) { case GameState.SCAN: Debug.Log("Scanning"); break; case GameState.GAMEPLAY: //Debug.Log("Gameplay"); mainCharacter.SetActive(true); pauseButton.SetActive(true); BuiltButton.SetActive(true); doneButton.SetActive(false); BuiltButton.SetActive(true); BackToGameplay.SetActive(false); World.SetActive(true); Coins.SetActive(true); Stairs.SetActive(true); timerCountDown.SetActive(false); if ((m_reconstructionBehaviour != null) && (m_reconstructionBehaviour.Reconstruction != null)) { m_reconstructionBehaviour.Reconstruction.Stop(); } break; case GameState.PROPRENDERING: Debug.Log("Render Models"); // rendering models break; case GameState.RESET: SceneManager.LoadScene("CimbItAR"); Time.timeScale = 1; Debug.Log("Go back to starting page"); break; case GameState.ONBUILT: pauseButton.SetActive(false); BackToGameplay.SetActive(true); BuiltButton.SetActive(false); timerCountDown.SetActive(true); Debug.Log("You can now build"); //baseBuilding.onBuilding(); break; case GameState.PAUSE: Debug.Log("Pause"); pausePanel.SetActive(true); pauseButton.SetActive(false); BuiltButton.SetActive(false); BackToGameplay.SetActive(false); Time.timeScale = 0; break; case GameState.UNPAUSE: Debug.Log("Un Pause"); pausePanel.SetActive(false); pauseButton.SetActive(true); Time.timeScale = 1; m_states = GameState.GAMEPLAY; break; } }