private void Update() { float value = 0f; if (Input.GetKeyDown(KeyCode.Alpha1)) { value = energyBar.max / 10f; energyBar.AddValue(value); } if (Input.GetKeyDown(KeyCode.Alpha2)) { value = energyBar.max / 10f * -1.0f; energyBar.AddValue(value); } if (Input.GetKeyDown(KeyCode.Alpha3)) { value = angryBar.max / 10f; angryBar.AddValue(value); } if (Input.GetKeyDown(KeyCode.Alpha4)) { value = angryBar.max / 10f * -1.0f; angryBar.AddValue(value); } if (Input.GetKeyDown(KeyCode.Alpha5)) { energyBar.ChargeToMax(); } if (Input.GetKeyDown(KeyCode.Alpha6)) { energyBar.ChargeToMin(); } }
public void GetReady(float duration) { bar.ChargeToMax(duration); }