added TODO for energy numbers

This commit is contained in:
Pfauenauge90 2020-01-19 22:39:01 +01:00
parent 454aa82669
commit 8a0efd3654
2 changed files with 6 additions and 2 deletions

View File

@ -81,7 +81,11 @@ impl<'a> System<'a> for Sys {
} { } {
let mut energy = energy.get_mut_unchecked(); let mut energy = energy.get_mut_unchecked();
// Have to account for Calc I differential equations due to acceleration // Have to account for Calc I differential equations due to acceleration
energy.change_by((energy.regen_rate * dt.0 + ENERGY_REGEN_ACCEL * dt.0.powf(2.0) / 2.0) as i32, EnergySource::Regen); energy.change_by(
(energy.regen_rate * dt.0 + ENERGY_REGEN_ACCEL * dt.0.powf(2.0) / 2.0)
as i32,
EnergySource::Regen,
);
energy.regen_rate += ENERGY_REGEN_ACCEL * dt.0; energy.regen_rate += ENERGY_REGEN_ACCEL * dt.0;
} }
} }

View File

@ -965,7 +965,7 @@ impl<'a> Widget for Skillbar<'a> {
.set(state.ids.health_text, ui); .set(state.ids.health_text, ui);
let energy_text = format!( let energy_text = format!(
"{}/{}", "{}/{}",
self.energy.current() as u32 / 10, self.energy.current() as u32 / 10, //TODO Fix regeneration with smaller energy numbers instead of dividing by 10 here
self.energy.maximum() as u32 / 10 self.energy.maximum() as u32 / 10
); );
Text::new(&energy_text) Text::new(&energy_text)