示例#1
0
 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();
 }
示例#2
0
 private void HandleEnemyKilled(Enemy enemy, PlayerDamageSource source)
 {
     if (source == PlayerDamageSource.LeftPistol)
     {
         countLeftKills++;
     }
     else if (source == PlayerDamageSource.RightPistol)
     {
         countRightKills++;
     }
     else
     {
         return;
     }
     RefreshUi();
 }