stolsky / the-smoking-mirror

GNU General Public License v3.0
0 stars 0 forks source link

add timer that change state #4

Open stolsky opened 2 years ago

stolsky commented 2 years ago

implement a timer using tick module that changes the state if run up

stolsky commented 2 years ago

as part of the game loop

game_loop (dt) {
    update(dt)
    render(ctx)
}
update (dt) {
    update_states(dt)
    ...
}
Tick.run(game_loop)