Crate wolf_engine
source ·Expand description
A simple, flexible, and easy to use game framework.
Features
logging
: Enables the built-in logging framework.
Getting Started
To use the latest release:
ⓘ
[dependencies]
wolf_engine = "0.24"
To use the latest development version:
ⓘ
wolf_engine = { git = "https://github.com/AlexiWolf/wolf_engine" }
Basic Usage
use wolf_engine::prelude::*;
let mut engine = Engine::new();
// The Engine will continue to return events until it quits.
while let Some(event) = engine.next_event() {
match event {
Event::Quit => {
// Shut down the game.
},
Event::Update => {
// Update the game.
// To shut down the Engine, you must send a quit event.
engine.send_event(Event::Quit);
},
Event::Render => {
// Render the game.
},
Event::EventsCleared => {
// Note: The engine will not emit Update / Render events on its own.
// You are expected to do this yourself.
engine.send_event(Event::Update);
engine.send_event(Event::Render);
}
_ => (),
}
}
Modules
Provides an event system for the engine.
Structs
Traits
Provides simplified, and more convenient methods for common operations.