add activities
Some checks failed
Rust / rustfmt (push) Successful in 19s
Rust / clippy (push) Failing after 38s
Rust / build (push) Successful in 2m3s

This commit is contained in:
luckyturtledev 2024-07-06 13:33:58 +02:00
parent 6f77fb9008
commit c957799a81
5 changed files with 50 additions and 7 deletions

View file

@ -1,11 +1,20 @@
use comfy::*;
use crate::State;
use crate::{
activities::{house, overworld, Activity},
State
};
pub fn update(_state: &mut State, _engine: &mut EngineContext) {
info!("update");
pub fn update(state: &mut State, engine: &mut EngineContext) {
match state.activity {
Activity::House => house::update(state, engine),
Activity::Overworld => overworld::update(state, engine)
}
}
pub fn draw(_state: &State, _engine: &EngineContext) {
draw_circle(vec2(0.0, 0.0), 0.5, RED, 0);
pub fn draw(state: &State, engine: &EngineContext) {
match state.activity {
Activity::House => house::draw(state, engine),
Activity::Overworld => overworld::draw(state, engine)
}
}