updated example

This commit is contained in:
dani 2023-07-27 04:43:15 +00:00
parent 79e53e094f
commit 9b1dd5e085
2 changed files with 2 additions and 2 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -1,16 +1,16 @@
use glam::IVec2;
use gsa::{run, Gsa}; use gsa::{run, Gsa};
struct Game {} struct Game {}
fn init(gsa: &mut Gsa) -> Game { fn init(gsa: &mut Gsa) -> Game {
//game initialisation code
gsa.sprites[0].tile = 0; gsa.sprites[0].tile = 0;
gsa.write_string(3, IVec2 { x: 10, y: 10 }, "Hello World, nyaa~");
Game {} Game {}
} }
fn update(game: &mut Game, gsa: &mut Gsa) { fn update(game: &mut Game, gsa: &mut Gsa) {
gsa.sprites[0].pos += gsa.input_dir(); gsa.sprites[0].pos += gsa.input_dir();
//once per frame code
} }
run!(init, update); run!(init, update);