add battery-ui (#6)
All checks were successful
Rust / rustfmt (push) Successful in 25s
Rust / clippy (push) Successful in 1m24s
Rust / build (push) Successful in 3m9s

Reviewed-on: #6
Co-authored-by: luckyturtledev <git@lukas1818.de>
Co-committed-by: luckyturtledev <git@lukas1818.de>
This commit is contained in:
luckyturtledev 2024-07-06 20:45:05 +00:00 committed by LuckyTurtleDev
parent 8143a99843
commit b98bc61a02
3 changed files with 52 additions and 1 deletions

View file

@ -5,6 +5,22 @@ use crate::{
use comfy::EngineContext;
use std::ops::Sub;
#[derive(Debug)]
pub struct Ghost {
/// current electric charge of the Ghost
pub charge: f32,
/// max electric charge of the Ghost
pub max_charge: f32
}
impl Default for Ghost {
fn default() -> Self {
Self {
charge: 1000.0,
max_charge: 1000.0
}
}
}
#[repr(i32)]
pub enum ZLayer {
MapMax = -1,
@ -39,4 +55,5 @@ pub fn draw(state: &State, engine: &EngineContext<'_>) {
Activity::House => house::draw(state, engine),
Activity::Overworld => overworld::draw(state, engine)
}
crate::ui::draw(state, engine);
}