Class SceneManagers
Manages Scene
Namespace: Evergine.Framework.Managers
Assembly: Evergine.Framework.dll
Syntax
public class SceneManagers
Remarks
Registered Scene
Constructors
SceneManagers(Scene)
Initializes a new instance of the Scene
Declaration
public SceneManagers(Scene scene)
Parameters
Type | Name | Description |
---|---|---|
Scene | scene | The scene. |
Properties
AssetSceneManager
Gets the entity manager.
Declaration
public AssetSceneManager AssetSceneManager { get; }
Property Value
Type | Description |
---|---|
Asset |
BehaviorManager
Gets the behavior manager.
Declaration
public BehaviorManager BehaviorManager { get; }
Property Value
Type | Description |
---|---|
Behavior |
EntityManager
Gets the entity manager.
Declaration
public EntityManager EntityManager { get; }
Property Value
Type | Description |
---|---|
Entity |
EnvironmentManager
Gets the environment manager.
Declaration
public EnvironmentManager EnvironmentManager { get; }
Property Value
Type | Description |
---|---|
Environment |
PhysicManager3D
Gets the behavior manager.
Declaration
public PhysicManager3D PhysicManager3D { get; }
Property Value
Type | Description |
---|---|
Physic |
RegisteredManagers
Gets the scene managers of the registered scene managers.
Declaration
public IEnumerable<SceneManager> RegisteredManagers { get; }
Property Value
Type | Description |
---|---|
IEnumerable<Scene |
RenderManager
Gets the render manager.
Declaration
public RenderManager RenderManager { get; }
Property Value
Type | Description |
---|---|
Render |
Scene
Gets the associated scene.
Declaration
public Scene Scene { get; }
Property Value
Type | Description |
---|---|
Scene |
Methods
ActivateManagers()
Activate scene managers.
Declaration
public void ActivateManagers()
Remarks
This method initializes only new scene managers, not yet initialized.
AddManager(SceneManager)
Registers a Scene
Declaration
public bool AddManager(SceneManager sceneManager)
Parameters
Type | Name | Description |
---|---|---|
Scene |
sceneManager | The instance to register. |
Returns
Type | Description |
---|---|
bool | True if the sceneManager has been successfully registered. |
Remarks
If the instance to register inherits from Updatable
Exceptions
Type | Condition |
---|---|
Argument |
If sceneManager is null. |
Argument |
If sceneManager is disposed or already attached. |
Invalid |
If a Scene |
AddManager<T>(T)
Registers a Scene
Declaration
public bool AddManager<T>(T sceneManager) where T : SceneManager
Parameters
Type | Name | Description |
---|---|---|
T | sceneManager | The instance to register. |
Returns
Type | Description |
---|---|
bool | True if the sceneManager has been successfully registered. |
Type Parameters
Name | Description |
---|---|
T | Type of the Scene |
Remarks
If the instance to register inherits from Updatable
Exceptions
Type | Condition |
---|---|
Argument |
If sceneManager is null. |
Argument |
If sceneManager is disposed or already attached. |
Invalid |
If a Scene |
AttachManagers()
Activate scene managers.
Declaration
public void AttachManagers()
Remarks
This method initializes only new scene managers that have not been initialized yet.
DetachManager(SceneManager)
Detaches the Scene
Declaration
public bool DetachManager(SceneManager sceneManager)
Parameters
Type | Name | Description |
---|---|---|
Scene |
sceneManager | The sceneManager to unregister. |
Returns
Type | Description |
---|---|
bool | True if the sceneManager has been successfully unregistered. |
Remarks
The unregistered Scene
DrawSceneManagers(TimeSpan)
Updates the registered Drawable
Declaration
public void DrawSceneManagers(TimeSpan gameTime)
Parameters
Type | Name | Description |
---|---|---|
Time |
gameTime | The game time. |
FindManager(Type, bool)
Gets a Scene
Declaration
public SceneManager FindManager(Type sceneManagerType, bool isExactType = false)
Parameters
Type | Name | Description |
---|---|---|
Type | sceneManagerType | Type of the SceneManager to get. |
bool | isExactType | Whether to match the exact type. |
Returns
Type | Description |
---|---|
Scene |
The Scene |
FindManager<T>(bool)
Gets a Scene
Declaration
public T FindManager<T>(bool isExactType = false) where T : SceneManager
Parameters
Type | Name | Description |
---|---|---|
bool | isExactType | Whether to match the exact type. |
Returns
Type | Description |
---|---|
T | The Scene |
Type Parameters
Name | Description |
---|---|
T | Type of the Scene |
FindManagers(Type, bool)
Gets a collection of Scene
Declaration
public IEnumerable<SceneManager> FindManagers(Type sceneManagerType, bool isExactType = false)
Parameters
Type | Name | Description |
---|---|---|
Type | sceneManagerType | Type of the SceneManager to get. |
bool | isExactType | Whether to match the exact type. |
Returns
Type | Description |
---|---|
IEnumerable<Scene |
The Scene |
FindManagers<T>(bool)
Gets a collection of Scene
Declaration
public IEnumerable<T> FindManagers<T>(bool isExactType = false) where T : SceneManager
Parameters
Type | Name | Description |
---|---|---|
bool | isExactType | Whether to match the exact type. |
Returns
Type | Description |
---|---|
IEnumerable<T> | The collection of Scene |
Type Parameters
Name | Description |
---|---|
T | Type of the Scene |
InternalRemoveSceneManager(SceneManager, bool)
Unregisters a Scene
Declaration
public bool InternalRemoveSceneManager(SceneManager sceneManager, bool destroy)
Parameters
Type | Name | Description |
---|---|---|
Scene |
sceneManager | The SceneManager to unregister. |
bool | destroy | True if the SceneManager will be destroyed. |
Returns
Type | Description |
---|---|
bool | True if the SceneManager has been successfully unregistered. |
Remarks
The unregistered Scene
RemoveManager(SceneManager)
Unregisters a Scene
Declaration
public bool RemoveManager(SceneManager sceneManager)
Parameters
Type | Name | Description |
---|---|---|
Scene |
sceneManager | The SceneManager to unregister. |
Returns
Type | Description |
---|---|
bool | True if the SceneManager has been successfully unregistered. |
Remarks
The unregistered Scene
RemoveManager<T>()
Unregisters a Scene
Declaration
public bool RemoveManager<T>() where T : SceneManager
Returns
Type | Description |
---|---|
bool | True if the Scene |
Type Parameters
Name | Description |
---|---|
T | Type of the Scene |
Remarks
The unregistered Scene
StartManagers()
Activate scene managers.
Declaration
public void StartManagers()
Remarks
This method initializes only new sceneManagers that are not initialized yet.
UpdateSceneManagers(TimeSpan)
Updates the registered Updatable
Declaration
public void UpdateSceneManagers(TimeSpan gameTime)
Parameters
Type | Name | Description |
---|---|---|
Time |
gameTime | The game time. |