in game-worlds, open game-input before starting game-loop and close after. otherwise there's a chance the game-loop might tick without game-input available
parent
0483a5044a
commit
575b0645a3
|
@ -12,12 +12,12 @@ M: game-world draw*
|
|||
swap >>tick-slice draw-world ;
|
||||
|
||||
M: game-world begin-world
|
||||
open-game-input
|
||||
dup [ tick-length ] [ ] bi <game-loop> [ >>game-loop ] keep start-loop
|
||||
drop
|
||||
open-game-input ;
|
||||
|
||||
M: game-world end-world
|
||||
close-game-input
|
||||
[ [ stop-loop ] when* f ] change-game-loop
|
||||
drop ;
|
||||
|
||||
M: game-world end-world
|
||||
[ [ stop-loop ] when* f ] change-game-loop
|
||||
close-game-input
|
||||
drop ;
|
||||
|
||||
|
|
Loading…
Reference in New Issue