コード例 #1
0
 // Update is called once per frame
 void Update()
 {
     if (CheckWaveCleared() && waveCount > 0 && isSpawning == false)
     {
         StartCoroutine(SpawnWave());
     }
     if (player == null)
     {
         gameOverText.text  = "You Died";
         gameOverText.color = Color.red;
         gameOverScreen.SetActive(true);
     }
     else if (CheckWaveCleared() && waveCount <= 0)
     {
         gameOverText.text  = "You won!!";
         gameOverText.color = Color.green;
         gameOverScreen.SetActive(true);
     }
     healthText.text = "Health: " + playerHealth.GetHealth();
     waveText.text   = "Waves: " + waveCount;
 }