Beispiel #1
0
 public override void PostDeSpawn(Map map)
 {
     if (map != null)
     {
         DestroyableObjects_MapComponent mapComp = map.GetComponent <DestroyableObjects_MapComponent>();
         if (mapComp != null)
         {
             mapComp.RemoveObjectFromMap(this.parent);
         }
     }
 }
Beispiel #2
0
 public override void PostDestroy(DestroyMode mode, Map previousMap)
 {
     if (previousMap != null)
     {
         DestroyableObjects_MapComponent mapComp = previousMap.GetComponent <DestroyableObjects_MapComponent>();
         if (mapComp != null)
         {
             mapComp.RemoveObjectFromMap(this.parent);
         }
     }
 }
Beispiel #3
0
 public override void PostSpawnSetup(bool respawningAfterLoad)
 {
     if (this.parent.Map != null)
     {
         DestroyableObjects_MapComponent mapComp = this.parent.Map.GetComponent <DestroyableObjects_MapComponent>();
         if (mapComp != null)
         {
             mapComp.AddObjectToMap(this.parent);
         }
     }
 }