EnergyUsingObject.setBatteryEnergyAt C# (CSharp) Method

setBatteryEnergyAt() public method

Sets the battery energy at batIndex and set to amt.
public setBatteryEnergyAt ( int batIndex, float amt ) : void
batIndex int Bat index.
amt float Amt.
return void
	public void setBatteryEnergyAt(int batIndex, float amt) {
		if (batIndex >= getNumBatteries() || batIndex < 0) {
			Debug.Log("setBatteryLevelAt - " + batIndex + " - NUM BATTERIES OUT OF BOUNDS");
			return;
		}
		Battery bat = powerSupply.getBatteryList()[batIndex];
		bat.setEnergy(amt);
	}