updated example
This commit is contained in:
parent
79e53e094f
commit
9b1dd5e085
Binary file not shown.
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 24 KiB |
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue