pub struct GameEngineHost { /* private fields */ }Expand description
Shared host coordinating a GameScene, fixed-timestep FrameClock, and InputState inside euv.
Implementations§
Source§impl GameEngineHost
Host construction, fixed-step execution, and scene mounting for GameEngineHost.
impl GameEngineHost
Host construction, fixed-step execution, and scene mounting for GameEngineHost.
Sourcepub fn set_paused(&self, paused: bool)
pub fn set_paused(&self, paused: bool)
Pauses or resumes simulation stepping for this game engine host (driven by Lifecycle::on_freeze/on_resume).
§Arguments
&Self- Engine host reference.bool-trueto pause simulation;falseto resume.
Sourcepub fn active_viewport_bounds(&self, tree: &SceneTree) -> Vec<Rect>
pub fn active_viewport_bounds(&self, tree: &SceneTree) -> Vec<Rect>
Sourcepub fn ingest_event(&self, event: &WindowEvent)
pub fn ingest_event(&self, event: &WindowEvent)
Feeds a WindowEvent into the hosted game InputState.
§Arguments
&Self- Engine host reference.&WindowEvent- Event received from the OS window.
Sourcepub fn mark_viewports_dirty(&self)
pub fn mark_viewports_dirty(&self)
Marks all mounted game viewport nodes paint-dirty without advancing simulation clocks (e.g. for lifecycle first frames or HUD-independent refreshes).
§Arguments
&Self- Engine host reference.
Sourcepub fn step_paced(&self, decision: &PacingDecision) -> u32
pub fn step_paced(&self, decision: &PacingDecision) -> u32
Executes a PacingDecision from FramePacingController, advancing simulation strictly on VSync decisions and never on deferred non-VSync triggers.
§Arguments
&Self- Engine host reference.&PacingDecision- Authoritative pacing decision for the current trigger.
§Returns
u32- Number of fixed simulation steps executed (0when deferred, capped, or lifecycle-first-frame).
Sourcepub fn set_virtual_stick(&self, dx: f32, dy: f32)
pub fn set_virtual_stick(&self, dx: f32, dy: f32)
Sets the virtual analog joystick vector (dx, dy) in [-1.0, 1.0] for mobile/tablet/gamepad play.
§Arguments
&Self- Engine host reference.f32- Horizontal axis.f32- Vertical axis.
Sourcepub fn press_key(&self, code: KeyCode)
pub fn press_key(&self, code: KeyCode)
Presses a virtual game key (ideal for holdable mobile touch D-pad buttons).
§Arguments
&Self- Engine host reference.KeyCode- Virtual key code to hold down.
Sourcepub fn release_key(&self, code: KeyCode)
pub fn release_key(&self, code: KeyCode)
Releases a previously pressed virtual game key.
§Arguments
&Self- Engine host reference.KeyCode- Virtual key code to release.
Sourcepub fn mount_viewport(&self, style: Style) -> NodeId
pub fn mount_viewport(&self, style: Style) -> NodeId
Mounts a live Canvas viewport into the active ambient Context backed by this GameScene.
Supports multi-platform interaction automatically: keyboard/mouse on Desktop & Web plus direct drag-to-steer virtual analog joystick on touch/mobile/tablet screens.
§Arguments
&Self- Engine host reference.Style- Layout and visual style of the game viewport.
§Returns
NodeId- Mounted game viewport scene node.