public void SetScore(GameObject gameObject) { switch (gameObject.tag) { case "Player": if ((score - 100) < 0) { score = 0; } else { score -= 100; } break; case "Enemy": score += 30; enemyMatrix.oneEnemyDown(gameObject); break; } UpdateScore(); }