Crates.io | bevy_jornet |
lib.rs | bevy_jornet |
version | 0.8.0 |
source | src |
created_at | 2022-08-18 22:23:37.587109 |
updated_at | 2024-07-04 19:39:16.379228 |
description | Bevy plugin for Jornet - a social game server |
homepage | https://jornet.vleue.com |
repository | https://github.com/vleue/jornet/tree/main/bevy-jornet |
max_upload_size | |
id | 648386 |
size | 133,157 |
Bevy plugin for easy leaderboard integration with Jornet. Works in WASM and native.
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.