gsa/examples/hello_world/main.rs

17 lines
312 B
Rust

use glam::IVec2;
use gsa::{run, Gsa};
struct Game {}
fn init(gsa: &mut Gsa) -> Game {
gsa.sprite[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.sprite[0].pos += gsa.input_dir();
}
run!(init, update);