A mobile game engine using Gtk and Cairo written in Rust!
[dependencies]
mochi = "0.0"
```rust init("game.gresource");
let imgmochi = imagefromresource("/game/mochi.png"); let imgmochieaten = imagefromresource("/game/mochieaten.png");
rungame(move |window, ctx, pointer, deltatime| { if pointer.isdown() { ctx.drawimagecentered( window.width / 2.0, window.height / 2.0, imgmochieaten, ); } else { ctx.drawimagecentered(window.width / 2.0, window.height / 2.0, imgmochi); } }); ```
This project is licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in mochi
by you, as defined in the Apache-2.0 license, shall be
dual licensed as above, without any additional terms or conditions.