1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

gg: minor fixes

This commit is contained in:
Alexander Medvednikov
2020-06-04 19:57:13 +02:00
parent cf9498ef6b
commit fb7ca56d87
6 changed files with 14 additions and 8 deletions

View File

@ -185,6 +185,7 @@ fn main() {
frame_fn: frame
event_fn: on_event
scale: 2
//wait_events: true
)
game.init_game()
go game.run() // Run the game loop in a new thread
@ -396,6 +397,7 @@ fn parse_binary_tetro(t_ int) []Block {
}
fn on_event(e &sapp.Event, mut game Game) {
//println('code=$e.char_code')
if e.typ == .key_down {
game.key_down(e.key_code)
}