private void Die() { // Animation eventually? spawnManager.RemoveDeadEnemy(gameObject); playerState.AddPoints(pointWorth); Destroy(gameObject); }
/// <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); }