protected void DispatchSpawnEvent(SpawnEventHandler evt, Enemy enemy) { if (evt != null) { evt(this, enemy); } }
/// <summary> /// Raises the spawn event. /// </summary> private void OnSpawn(GameObject newUnit) { SpawnEventHandler hand = SpawnEvent; if (hand != null) { hand(this, new SpawnEventArgs(newUnit)); } }