concinnity_core/components/scene_command.rs
1// src/components/scene_command.rs
2
3use alloc::string::String;
4use alloc::string::ToString;
5
6use crate::ecs::asset_id::AssetId;
7
8/// Runtime-only event sent by UiInputSystem when a scene-jump HitRegion fires.
9/// GraphicsSystem reads these from its `Events<SceneCommand>` queue each step and
10/// applies the scene jump. World authors never declare this type directly.
11#[derive(Debug, Clone)]
12pub struct SceneCommand {
13 /// The scene to jump to.
14 pub scene: AssetId,
15 /// Named transition to play across the jump.
16 pub transition: String,
17}
18
19impl Default for SceneCommand {
20 fn default() -> Self {
21 Self {
22 scene: AssetId::default(),
23 transition: "FadeBlack".to_string(),
24 }
25 }
26}