public void PowerUpdateCurrentChange() { powerSupply.FlushSupplyAndUp(powerSupply.gameObject); //Room for optimisation CircuitResistance = ElectricityFunctions.WorkOutResistance(powerSupply.ResistanceComingFrom [powerSupply.gameObject.GetInstanceID()]); // //!! ActualVoltage = powerSupply.ActualVoltage; BatteryCalculation.PowerUpdateCurrentChange(this); if (current != Previouscurrent) { if (Previouscurrent == 0 && !(current <= 0)) { // } else if (current == 0 && !(Previouscurrent <= 0)) { powerSupply.FlushSupplyAndUp(powerSupply.gameObject); //powerSupply.TurnOffSupply(); } powerSupply.SupplyingCurrent = current; Previouscurrent = current; } //if (current > 0) { powerSupply.PowerUpdateCurrentChange(); //} }
public void PowerUpdateCurrentChange() { //Logger.Log ("PowerUpdateCurrentChange"); powerSupply.PowerUpdateCurrentChange(); }
public void PowerUpdateCurrentChange() { powerSupply.PowerUpdateCurrentChange(); }