Class BaseScene
A scoped scene that owns GameObjects and their components.
public abstract class BaseScene
- Inheritance
-
BaseScene
- Inherited Members
Properties
FixedTimeStep
public double FixedTimeStep { get; set; }
Property Value
Game
protected Game Game { get; }
Property Value
GameObjects
public IReadOnlyList<GameObject> GameObjects { get; }
Property Value
IsLoaded
public bool IsLoaded { get; }
Property Value
MaximumFixedStepsPerFrame
public int MaximumFixedStepsPerFrame { get; set; }
Property Value
SceneGameHost
protected SceneGameHost SceneGameHost { get; }
Property Value
Services
protected IServiceProvider Services { get; }
Property Value
Methods
CreateGameObject(string)
[Obsolete("Use Instantiate instead.")]
protected GameObject CreateGameObject(string name = "GameObject")
Parameters
namestring
Returns
CreateGameObject<T>(string)
[Obsolete("Use Instantiate<T> instead.")]
protected T CreateGameObject<T>(string name) where T : GameObject
Parameters
namestring
Returns
- T
Type Parameters
T
Destroy(GameObject)
Disables an object and schedules its disposal after the current scene phase.
public bool Destroy(GameObject gameObject)
Parameters
gameObjectGameObject
Returns
Draw(double, double)
public virtual void Draw(double frameDelta, double frameRate)
Parameters
FixedUpdate(double)
public virtual void FixedUpdate(double fixedDeltaTime)
Parameters
fixedDeltaTimedouble
Instantiate(string)
Creates a scene-owned GameObject. Runtime objects start after their components attach.
public GameObject Instantiate(string name = "GameObject")
Parameters
namestring
Returns
Instantiate<T>(string)
Creates a scene-owned GameObject subtype through the scene's DI scope.
public T Instantiate<T>(string name = "GameObject") where T : GameObject
Parameters
namestring
Returns
- T
Type Parameters
T
LateUpdate(double)
public virtual void LateUpdate(double deltaTime)
Parameters
deltaTimedouble
Load()
public virtual void Load()
Resize(Vector2)
public virtual void Resize(Vector2 size)
Parameters
sizeVector2
Unload()
public virtual void Unload()
Update(double)
public virtual void Update(double deltaTime)
Parameters
deltaTimedouble