bevy_jornet

Crates.iobevy_jornet
lib.rsbevy_jornet
version0.8.0
sourcesrc
created_at2022-08-18 22:23:37.587109
updated_at2024-07-04 19:39:16.379228
descriptionBevy plugin for Jornet - a social game server
homepagehttps://jornet.vleue.com
repositoryhttps://github.com/vleue/jornet/tree/main/bevy-jornet
max_upload_size
id648386
size133,157
publish (github:vleue:publish)

documentation

https://docs.rs/bevy_jornet

README

Bevy Jornet

Jornet logo

Bevy plugin for easy leaderboard integration with Jornet. Works in WASM and native.

Setup

Add this crate as a dependency, then add the plugin. You cna get an id and a key at https://jornet.vleue.com. The key must remain secret.

app.add_plugins(JornetPlugin::with_leaderboard(id, key));

You can then create a new player to send scores, or retrieve the current leaderboard:

fn leaderboard_setup(mut leaderboard: ResMut<Leaderboard>) {
    // `None` will create a new user with a random name
    leaderboard.create_player(None);

    leaderboard.refresh_leaderboard();
}

See the whac-a-square example for a complete integration.

leaderboard

Commit count: 0

cargo fmt