OmegaEngine API
1.0.3
|
A common base class for all objects that need an Engine instance. More...
Public Member Functions | |
void | Dispose () |
Public Attributes | |
bool | IsEngineSet => _engine != null |
true if the Engine has been set. More... | |
Protected Member Functions | |
void | RegisterChild (EngineElement element, bool autoDispose=true) |
Registers a child EngineElement for automatic Engine setting and Dispose calling. More... | |
void | UnregisterChild (EngineElement element) |
Unregisters a child EngineElement (opposite of RegisterChild). More... | |
virtual void | OnEngineSet () |
Hook that is calld when Engine is set for the first time. More... | |
virtual void | OnDispose () |
Hook that is called when the object needs to dispose its internal resources. More... | |
Properties | |
Engine | Engine [get, set] |
The Engine instance used by this object. Must be set before using the object. May not be changed once it has been set! More... | |
bool | IsDisposed [get] |
Indicates whether this object has been disposed and can therefore no longer be used. More... | |
A common base class for all objects that need an Engine instance.
|
inlineprotectedvirtual |
Hook that is called when the object needs to dispose its internal resources.
Reimplemented in OmegaEngine.Graphics.Shaders.Shader, OmegaEngine.Graphics.Renderables.CpuParticleSystem, OmegaEngine.Graphics.View, OmegaEngine.Graphics.Renderables.VertexGroup, OmegaEngine.Engine, OmegaEngine.Graphics.Renderables.Model, OmegaEngine.Graphics.Shaders.WaterShader, OmegaEngine.Graphics.Renderables.SimpleSkybox, OmegaEngine.Graphics.Renderables.Water, OmegaEngine.Graphics.Shaders.ParticleShader, OmegaEngine.Graphics.Renderables.GpuParticleSystem, OmegaEngine.Audio.Sound, OmegaEngine.Audio.Song, OmegaEngine.Audio.Sound3D, OmegaEngine.Graphics.Renderables.AnimatedModel, OmegaEngine.Graphics.Shaders.PostScratchedFilmShader, OmegaEngine.Graphics.Renderables.Skybox, and OmegaEngine.EngineElementCollection< T >.
|
inlineprotectedvirtual |
Hook that is calld when Engine is set for the first time.
Reimplemented in OmegaEngine.Graphics.Shaders.Shader, OmegaEngine.Graphics.Renderables.PositionableRenderable, OmegaEngine.Graphics.Renderables.CpuParticleSystem, OmegaEngine.Graphics.View, OmegaEngine.Graphics.Renderables.VertexGroup, OmegaEngine.Graphics.Shaders.WaterShader, OmegaEngine.Graphics.Shaders.ParticleShader, OmegaEngine.Graphics.Shaders.TerrainShader, OmegaEngine.Graphics.Renderables.GpuParticleSystem, OmegaEngine.Graphics.Renderables.SimpleSkybox, OmegaEngine.Graphics.Shaders.GeneralShader, OmegaEngine.Graphics.Shaders.PostGlowShader, OmegaEngine.Graphics.Shaders.PostColorCorrectionShader, OmegaEngine.Audio.Song, OmegaEngine.Graphics.TextureView, OmegaEngine.Audio.Sound, OmegaEngine.Graphics.Shaders.PostCameraShakeShader, OmegaEngine.Graphics.Shaders.PostSepiaShader, OmegaEngine.Graphics.Shaders.PostRadialBlurShader, OmegaEngine.Graphics.Shaders.PostScratchedFilmShader, OmegaEngine.Graphics.Shaders.PostHaloShader, OmegaEngine.Graphics.Shaders.PostBleachShader, OmegaEngine.Graphics.Shaders.PostBlurShader, and OmegaEngine.EngineElementCollection< T >.
|
inlineprotected |
Registers a child EngineElement for automatic Engine setting and Dispose calling.
element | The EngineElement to register. Silently ignores null . |
autoDispose | Controls whether the element is automatically disposed when Dispose is called. |
|
inlineprotected |
Unregisters a child EngineElement (opposite of RegisterChild).
element | The EngineElement to unregister. Silently ignores null . |
bool OmegaEngine.EngineElement.IsEngineSet => _engine != null |
true
if the Engine has been set.
|
getset |
The Engine instance used by this object. Must be set before using the object. May not be changed once it has been set!
InvalidOperationException | Trying to read the engine before it has been set. |
|
get |
Indicates whether this object has been disposed and can therefore no longer be used.