메소드 | 설명 | |
---|---|---|
ReceiveEnergy ( ) : float |
Receives the energy. called from the plug load..
|
|
addBattery ( Battery, bat ) : void |
Adds the battery to batteryList
|
|
connectToPlugLoad ( PlugLoad, pl ) : void | ||
disconnectFromPlugLoad ( ) : void | ||
getBatteryEnergyAt ( int batIndex ) : float |
Gets the battery level at batIndex.
|
|
getConnectedPlugLoad ( ) : PlugLoad, | ||
getEnergyUsagePerSec ( ) : float |
Gets the energy usage per sec.
|
|
getIsEnergySupplied ( ) : bool |
Gets the is energy supplied.
|
|
getIsPluggedIn ( ) : bool | ||
getIsPoweredOn ( ) : bool |
Gets if is powered on.
|
|
getIsUsingBattery ( ) : bool |
Gets the is using battery.
|
|
getNumBatteries ( ) : int |
Gets the number batteries.
|
|
getTotalEnergyUsage ( ) : float |
Gets the total energy usage.
|
|
powerOff ( ) : bool |
Powers off.
|
|
powerOn ( ) : bool |
Powers on.
|
|
removeBatteryAt ( int batIndex ) : void |
Removes the battery at batIndex.
|
|
setBatteryEnergyAt ( int batIndex, float amt ) : void |
Sets the battery energy at batIndex and set to amt.
|
|
startSupplyingEnergy ( ) : void |
Starts the supplying energy.
|
|
startUsingBattery ( ) : void |
Starts the using battery.
|
|
stopSupplyingEnergy ( ) : void |
Stops the supplying energy.
|
|
stopUsingBattery ( ) : void |
Stops the using battery.
|
|
toggleSupplyingEnergy ( ) : void | ||
toggleSupplyingEnergy ( Button sender ) : void |
for when a button in the ui has to toggle this that way this method auto sets whatever button it was. Hopefully that button is linked to the proper EUO. Oh well.
|
메소드 | 설명 | |
---|---|---|
Awake ( ) : void | ||
Start ( ) : void | ||
Update ( ) : void |
Update this instance. /// Updates the energy use. Does necessary calculations for averages and totals. should be called each frame from the energy hub.
|
|
hasPower ( ) : bool |
returns if has power.
|
public addBattery ( Battery, bat ) : void | ||
bat | Battery, | Bat. the Battery to add |
리턴 | void |
public getBatteryEnergyAt ( int batIndex ) : float | ||
batIndex | int | Bat index. |
리턴 | float |
public removeBatteryAt ( int batIndex ) : void | ||
batIndex | int | Bat index. |
리턴 | void |
public setBatteryEnergyAt ( int batIndex, float amt ) : void | ||
batIndex | int | Bat index. |
amt | float | Amt. |
리턴 | void |
public toggleSupplyingEnergy ( Button sender ) : void | ||
sender | Button | Sender. |
리턴 | void |