hide suit integrity gauge

This commit is contained in:
yuni 2024-05-08 06:42:45 +02:00
parent c2124180f6
commit 249b937f68

View file

@ -101,7 +101,7 @@ enum Gauge {
Health,
Power,
Oxygen,
Integrity,
//Integrity,
}
#[derive(Resource)]
@ -344,7 +344,7 @@ fn setup(
("sprites/gauge_heart.png", Gauge::Health),
("sprites/gauge_battery.png", Gauge::Power),
("sprites/gauge_o2.png", Gauge::Oxygen),
("sprites/gauge_suit.png", Gauge::Integrity),
//("sprites/gauge_suit.png", Gauge::Integrity),
];
let icon_size = 24.0;
let gauge_bar_padding_left = 4.0;
@ -447,7 +447,7 @@ fn setup(
style: Style {
width: Val::Percent(30.0),
height: Val::Percent(100.0),
bottom: Val::VMin(SPEEDOMETER_HEIGHT + 3.0),
bottom: Val::VMin(11.0),
left: Val::VMin(4.0),
align_items: AlignItems::End,
overflow: Overflow::clip(),
@ -722,7 +722,7 @@ fn update_gauges(
let value: f32 = match gauge {
Gauge::Health => hp.current / hp.max,
Gauge::Oxygen => (suit.oxygen / suit.oxygen_max).powf(0.5),
Gauge::Integrity => suit.integrity,
//Gauge::Integrity => suit.integrity,
Gauge::Power => battery.power / battery.capacity,
};
if value < 0.5 {