mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
added TODO for energy numbers
This commit is contained in:
parent
454aa82669
commit
8a0efd3654
@ -81,7 +81,11 @@ impl<'a> System<'a> for Sys {
|
||||
} {
|
||||
let mut energy = energy.get_mut_unchecked();
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
|
@ -965,7 +965,7 @@ impl<'a> Widget for Skillbar<'a> {
|
||||
.set(state.ids.health_text, ui);
|
||||
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
|
||||
);
|
||||
Text::new(&energy_text)
|
||||
|
Loading…
Reference in New Issue
Block a user