public override void Destroy(bool modifyLevel = false) { output.Destroy(); output = null; input.Destroy(); input = null; base.Destroy(modifyLevel); }
public virtual void Destroy(bool modifyLevel = false) { if (modifyLevel) { Globals.level.rails.Remove(this as Rail); } else { placedItems.Remove(this); //Globals.level.rails.Remove(cell.rail); } cell.item = null; cell.isEmpty = true; if (power != null) { power.Destroy(); } //SetGridCell(new Cell(x, y)); }