public override void PostDeSpawn(Map map) { if (map != null) { DestroyableObjects_MapComponent mapComp = map.GetComponent <DestroyableObjects_MapComponent>(); if (mapComp != null) { mapComp.RemoveObjectFromMap(this.parent); } } }
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); } } }
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); } } }