0.1.0-0-pre.11-fix.5

This commit is contained in:
2026-09-16 22:58:48 +02:00
parent 9386372e51
commit 9197758184
9 changed files with 181 additions and 90 deletions

View File

@@ -1,11 +1,19 @@
// file: crates/engines/engine-v1-common/src/game_loop.rs
// version: 3
// version: 4
/// 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);
/// Handles a platform-independent request to leave the current runtime.
///
/// Games may mutate their state and return [`crate::QuitDecision::Continue`] to implement
/// pause/confirmation screens, navigation, score submission, saving, or other workflows.
fn quit_requested(&mut self, _request: crate::QuitRequest) -> crate::QuitDecision {
return crate::QuitDecision::Exit;
}
/// Produces the platform-independent scene rendered after the update.
fn scene(&self) -> crate::EngineScene {
return crate::EngineScene::empty(crate::RenderColor::rgb(18, 18, 24));