public override void Destroy(DestroyMode mode = DestroyMode.Vanish) { MeadBarrels_MapComponent mapComp = this.Map.GetComponent <MeadBarrels_MapComponent>(); if (mapComp != null) { mapComp.RemoveMeadBarrelFromMap(this); } base.Destroy(mode); }
public override void SpawnSetup(Map map, bool respawningAfterLoad) { MeadBarrels_MapComponent mapComp = map.GetComponent <MeadBarrels_MapComponent>(); if (mapComp != null) { mapComp.AddMeadBarrelToMap(this); } base.SpawnSetup(map, respawningAfterLoad); }