Skip to main content

euv_engine/scene/
struct.rs

1use crate::*;
2
3/// Manages scene registration, transitions, and lifecycle.
4#[derive(Clone, Data, New)]
5pub struct SceneManager {
6    /// All registered scenes keyed by name.
7    #[get(pub(crate))]
8    #[get_mut(pub(crate))]
9    #[set(pub(crate))]
10    #[new(skip)]
11    pub(crate) scenes: HashMap<String, SceneRc>,
12    /// The name of the currently active scene, if any.
13    #[get(pub(crate))]
14    #[get_mut(pub(crate))]
15    #[set(pub(crate))]
16    #[new(skip)]
17    pub(crate) current_scene_name: Option<String>,
18    /// The name of the next scene to switch to (for deferred transitions).
19    #[get(pub(crate))]
20    #[get_mut(pub(crate))]
21    #[set(pub(crate))]
22    #[new(skip)]
23    pub(crate) pending_scene_name: Option<String>,
24}