private void OnStateChange(GameStateValue gameState) { if (gameState == GameStateValue.Reset_Normal || gameState == GameStateValue.Reset_Tutorial) { count = 0; textMesh.text = "Deaths: " + count; } }
private void OnStateChange(GameStateValue gameState) { if (gameState == GameStateValue.Reset_Normal || gameState == GameStateValue.Reset_Tutorial) { scoreSubtract = 0; scoreValue = 0; topScore = 0; } }
private void OnStateChange(GameStateValue gameState) { if (gameState == GameStateValue.Main_Menu) { gameObject.SetActive(true); } else { gameObject.SetActive(false); } }
private void OnStateChange(GameStateValue gameState) { if (gameState == GameStateValue.Main_Menu) { sideCamera.SetActive(true); mainCamera.SetActive(false); } else { mainCamera.SetActive(true); sideCamera.SetActive(false); } }
private void OnStateChange(GameStateValue gameState) { if (gameState == GameStateValue.Reset_Tutorial) { ResetTutorial(); } if (gameState == GameStateValue.Tutorial) { player.GetComponent <PlayerController>().OnDeath += OnDeath; } if (gameState != GameStateValue.Reset_Tutorial && gameState != GameStateValue.Tutorial) { DisableAllPanels(); player.GetComponent <PlayerController>().OnDeath -= OnDeath; } }
private void OnStateChange(GameStateValue gameState) { if (gameState == GameStateValue.Reset_Normal || gameState == GameStateValue.Main_Menu) { GameObject.Find("Player").GetComponent <PlayerController>().ResetPosition(); ClearChunks(); InsertNextChunk(startingChunk); } if (gameState == GameStateValue.Normal) { GameObject.Find("Player").GetComponent <PlayerController>().OnDeath += PutEmptyLevelOnDeath; } if (gameState != GameStateValue.Normal) { GameObject.Find("Player").GetComponent <PlayerController>().OnDeath -= PutEmptyLevelOnDeath; } }
private void UpdateGUI(GameStateValue gameState) { gameObject.SetActive(gameState == GameStateValue.Pause); }