add activities
This commit is contained in:
parent
6f77fb9008
commit
c957799a81
5 changed files with 50 additions and 7 deletions
19
src/game.rs
19
src/game.rs
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue