gsa/examples/hello_world/main.rs

17 lines
313 B
Rust

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