public void PassOnRemoveSupply(IElectricityIO ComingFrom, GameObject SourceInstance = null) { if (ComingFrom == TheStart) { TheEnd.RemoveSupply(SourceInstance); } else if (ComingFrom == TheEnd) { TheStart.RemoveSupply(SourceInstance); } for (int i = 0; i < Covering.Count; i++) { Covering[i].Data.ActualVoltage = 0; Covering[i].Data.CurrentInWire = 0; Covering[i].Data.EstimatedResistance = 0; } }
public static class PowerSupplyFunction { //Responsible for keeping the update and day to clean up off the supply in check public static void TurnOffSupply(IElectricityIO Supply) { Supply.RemoveSupply(Supply.GameObject()); ElectricalSynchronisation.NUCurrentChange.Add(Supply.InData.ControllingUpdate); }