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

        if (hand != null)
        {
            hand(this, new SpawnEventArgs(newUnit));
        }
    }