private void HandleEnemyKilled(Enemy enemy, PlayerDamageSource source) { if (source != PlayerDamageSource.LeftPistol && source != PlayerDamageSource.RightPistol) { return; } _score += enemy.score; if (_score >= _requiredForNextStep) { _enemySpawner.level++; _additionalScoreForNextStep += _nextLevelStep; _requiredForNextStep += _additionalScoreForNextStep; PlayAudioClip(_levelUpClip); } RefreshUi(); }
private void HandleEnemyKilled(Enemy enemy, PlayerDamageSource source) { if (source == PlayerDamageSource.LeftPistol) { countLeftKills++; } else if (source == PlayerDamageSource.RightPistol) { countRightKills++; } else { return; } RefreshUi(); }