コード例 #1
0
 private void OnStateChange(GameStateValue gameState)
 {
     if (gameState == GameStateValue.Reset_Normal || gameState == GameStateValue.Reset_Tutorial)
     {
         count         = 0;
         textMesh.text = "Deaths: " + count;
     }
 }
コード例 #2
0
ファイル: ScoreCount.cs プロジェクト: Amix2/Infinite-Runner
 private void OnStateChange(GameStateValue gameState)
 {
     if (gameState == GameStateValue.Reset_Normal || gameState == GameStateValue.Reset_Tutorial)
     {
         scoreSubtract = 0;
         scoreValue    = 0;
         topScore      = 0;
     }
 }
コード例 #3
0
 private void OnStateChange(GameStateValue gameState)
 {
     if (gameState == GameStateValue.Main_Menu)
     {
         gameObject.SetActive(true);
     }
     else
     {
         gameObject.SetActive(false);
     }
 }
コード例 #4
0
 private void OnStateChange(GameStateValue gameState)
 {
     if (gameState == GameStateValue.Main_Menu)
     {
         sideCamera.SetActive(true);
         mainCamera.SetActive(false);
     }
     else
     {
         mainCamera.SetActive(true);
         sideCamera.SetActive(false);
     }
 }
コード例 #5
0
 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;
     }
 }
コード例 #6
0
 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;
     }
 }
コード例 #7
0
ファイル: DarkCanvas.cs プロジェクト: Amix2/Infinite-Runner
 private void UpdateGUI(GameStateValue gameState)
 {
     gameObject.SetActive(gameState == GameStateValue.Pause);
 }