Table of Contents

Class Game

Namespace
FrameOfReference
Assembly
FrameOfReference.dll

Represents a running instance of the game.

public class Game : GameBase, IRenderHost, IDisposable
Inheritance
object
Game
Implements
Inherited Members

Constructors

Game(Settings)

Represents a running instance of the game.

public Game(Settings settings)

Parameters

settings Settings

Properties

CanResume

[UsedImplicitly]
public bool CanResume { get; }

Property Value

bool

Methods

ApplyGeneralSettings()

Called when Changed.

protected override void ApplyGeneralSettings()

BindLua(Lua)

Registers commonly used objects in a Lua context.

[LuaHide]
public override void BindLua(Lua lua)

Parameters

lua Lua

Dispose(bool)

To be called by Dispose() and the object destructor.

protected override void Dispose(bool disposing)

Parameters

disposing bool

true if called manually and not by the garbage collector.

Initialize()

To be called after the window is ready and the Engine needs to be set up

protected override bool Initialize()

Returns

bool

true if the initialization worked, false if it failed and the app must be closed

LoadMap(string)

Loads a game map and switches to in-game mode.

[UsedImplicitly]
public void LoadMap(string name)

Parameters

name string

ModifyMap(string)

Loads a game map and switches to live modification mode.

[UsedImplicitly]
public void ModifyMap(string name)

Parameters

name string

ResumeGame()

Switches to in-game mode using the resume session.

[UsedImplicitly]
public void ResumeGame()

Run()

Shows the window and runs the render loop until Exit() is called.

[LuaHide]
public override void Run()

SwitchToMenu()

Switches to the main menu.

[UsedImplicitly]
public void SwitchToMenu()

Update(double)

Called once per frame before Render(double) to advance the application state (e.g. game simulation, GUI scripts).

protected override double Update(double elapsedTime)

Parameters

elapsedTime double

The number of seconds of real time that have passed since the last frame.

Returns

double

The number of seconds of game time that have passed. Passed on to Render(double) to drive time-based visual effects.