Crates.io | game_engine_core |
lib.rs | game_engine_core |
version | 1.1.2 |
source | src |
created_at | 2021-04-11 17:16:04.020972 |
updated_at | 2021-05-27 16:05:32.212519 |
description | The main loop of a game engine. |
homepage | |
repository | https://github.com/jojolepro/game_engine_core/ |
max_upload_size | |
id | 382073 |
size | 18,279 |
Support an Open Source Developer! :hearts:
Read the documentation.
Add the following to you Cargo.toml file:
game_engine_core = "*"
Use it like so:
use game_engine_core::*;
struct MyState;
impl State<i32> for MyState {
fn update(&mut self, state_data: &mut i32) -> StateTransition<i32> {
*state_data += 1;
StateTransition::Quit
}
}
fn main() {
Engine::new(MyState, 0, |_, _| {}, 1000.0)
.engine_loop();
}