Skip to main content

euv_engine/scene/
struct.rs

1use super::*;
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_mut(pub(crate))]
8    #[set(pub(crate))]
9    #[new(skip)]
10    pub(crate) scenes: HashMap<String, SceneRc>,
11    /// The name of the currently active scene, if any.
12    #[get_mut(pub(crate))]
13    #[set(pub(crate))]
14    #[new(skip)]
15    pub(crate) current_scene_name: Option<String>,
16    /// The name of the next scene to switch to (for deferred transitions).
17    #[get_mut(pub(crate))]
18    #[set(pub(crate))]
19    #[new(skip)]
20    pub(crate) pending_scene_name: Option<String>,
21    /// The reusable per-frame draw list. Cleared and refilled each render call
22    /// so the backing `Vec` capacity is reused across frames.
23    #[get_mut(pub(crate))]
24    #[set(pub(crate))]
25    #[new(skip)]
26    pub(crate) draw_list: DrawList,
27}