0.1.0-0-pre.10
This commit is contained in:
@@ -1,10 +1,15 @@
|
||||
// file: crates/engines/engine-v1-common/src/game_loop.rs
|
||||
// version: 2
|
||||
// version: 3
|
||||
|
||||
/// Minimal update contract implemented by a game state consumed by engine V1.
|
||||
pub trait EngineGame {
|
||||
/// Advances the game by one engine update using platform-independent input.
|
||||
fn update(&mut self, frame: crate::EngineFrame, input: crate::InputState);
|
||||
|
||||
/// Produces the platform-independent scene rendered after the update.
|
||||
fn scene(&self) -> crate::EngineScene {
|
||||
return crate::EngineScene::empty(crate::RenderColor::rgb(18, 18, 24));
|
||||
}
|
||||
}
|
||||
|
||||
/// Deterministic fixed-step driver used before and underneath platform event loops.
|
||||
|
||||
Reference in New Issue
Block a user