mochi 0.0.0

A mobile game engine based on Gtk & Cairo
Documentation

Mochi :dango:

A mobile game engine using Gtk and Cairo written in Rust!

[dependencies]
mochi = "0.0"
init("game.gresource");

let img_mochi = image_from_resource("/game/mochi.png");
let img_mochi_eaten = image_from_resource("/game/mochi_eaten.png");

run_game(move |window, ctx, pointer, delta_time| {
    if pointer.is_down() {
        ctx.draw_image_centered(
            window.width / 2.0,
            window.height / 2.0,
            img_mochi_eaten,
        );
    } else {
        ctx.draw_image_centered(window.width / 2.0, window.height / 2.0, img_mochi);
    }
});

License

This project is licensed under either of

at your option.

Contribution

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.