Пример #1
0
 private void Die()
 {
     // Animation eventually?
     spawnManager.RemoveDeadEnemy(gameObject);
     playerState.AddPoints(pointWorth);
     Destroy(gameObject);
 }
Пример #2
0
 /// <summary>
 /// Notifys that an enemy has been destroyed.
 /// </summary>
 /// <param name="pointsAdded"></param>
 public void DestroyedEnemy(int PointsAdded)
 {
     PlayerState.AddPoints(PointsAdded);
     PointsText.text = string.Format(GameConstants.TEXT_POINTS, PlayerState.Points);
 }