Table of Contents

Class BaseScene

Namespace
Axolotl2D.Scenes
Assembly
Axolotl2D.dll

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

double

Game

protected Game Game { get; }

Property Value

Game

GameObjects

public IReadOnlyList<GameObject> GameObjects { get; }

Property Value

IReadOnlyList<GameObject>

IsLoaded

public bool IsLoaded { get; }

Property Value

bool

MaximumFixedStepsPerFrame

public int MaximumFixedStepsPerFrame { get; set; }

Property Value

int

SceneGameHost

protected SceneGameHost SceneGameHost { get; }

Property Value

SceneGameHost

Services

protected IServiceProvider Services { get; }

Property Value

IServiceProvider

Methods

CreateGameObject(string)

[Obsolete("Use Instantiate instead.")]
protected GameObject CreateGameObject(string name = "GameObject")

Parameters

name string

Returns

GameObject

CreateGameObject<T>(string)

[Obsolete("Use Instantiate<T> instead.")]
protected T CreateGameObject<T>(string name) where T : GameObject

Parameters

name string

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

gameObject GameObject

Returns

bool

Draw(double, double)

public virtual void Draw(double frameDelta, double frameRate)

Parameters

frameDelta double
frameRate double

FixedUpdate(double)

public virtual void FixedUpdate(double fixedDeltaTime)

Parameters

fixedDeltaTime double

Instantiate(string)

Creates a scene-owned GameObject. Runtime objects start after their components attach.

public GameObject Instantiate(string name = "GameObject")

Parameters

name string

Returns

GameObject

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

name string

Returns

T

Type Parameters

T

LateUpdate(double)

public virtual void LateUpdate(double deltaTime)

Parameters

deltaTime double

Load()

public virtual void Load()

Resize(Vector2)

public virtual void Resize(Vector2 size)

Parameters

size Vector2

Unload()

public virtual void Unload()

Update(double)

public virtual void Update(double deltaTime)

Parameters

deltaTime double