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