protected void OnDeath() { if (myBarracks != null) { myBarracks.OnUnitKilled(this); } if (myPlayer != null) { myPlayer.minions.Remove(this); } Destroy(gameObject); }