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()

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.

GetElapsedGameTime(double)

Determines the amount of elapsed game time from the amount of elapsed real time.

protected override double GetElapsedGameTime(double elapsedTime)

Parameters

elapsedTime double

Returns

double

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

NewLua()

Creates a new LuaInterface.Lua instance with commonly used objects preloaded.

[LuaHide]
public override Lua NewLua()

Returns

Lua

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()