// Func for player attacking enemy base public void AttackEnemyBase() { // Reduce base health enmBaseHealth -= 0.2f; // Check if enemy base is destroyed if (enmBaseHealth <= 0.0f) { // Player has won, set to winner and flag to show win text Debug.Log("You win! GAME OVER"); winner = Character.Ownership.Player; finishGame = true; } }
// Func for enemies attacking player base public void AttackPlayerBase() { // Reduce base health plrBaseHealth -= 0.2f; // Check if player base is destroyed if (plrBaseHealth <= 0.0f) { // Enemy has won, set to winner and flag to show lose text Debug.Log("You lose! GAME OVER"); winner = Character.Ownership.Enemy; finishGame = true; } }