public CurrentGameStatus EnemyDie() { enemyAliveCount--; if (enemyAliveCount <= 0) { currentStatus = CurrentGameStatus.AllEnemyDead; } return(currentStatus); }
void checkStatus() { if (Players.Length == 2 && Players[0].GetComponent <Player>().lifeController.currentLife <= 0 && Players[1].GetComponent <Player>().lifeController.currentLife <= 0) { currentStatus = CurrentGameStatus.PlayerDead; } else if (enemyAliveCount == 0) { currentStatus = CurrentGameStatus.AllEnemyDead; } else if (shootOnScreenCount == 0) { currentStatus = CurrentGameStatus.NotShootOnScreen; } }