Class Game
- Namespace
- FrameOfReference
- Assembly
- FrameOfReference.dll
Represents a running instance of the game.
public class Game : GameBase, IRenderHost, IDisposable
- Inheritance
-
objectGame
- Implements
- Inherited Members
Constructors
Game(Settings)
Represents a running instance of the game.
public Game(Settings settings)
Parameters
settingsSettings
Properties
CanResume
[UsedImplicitly]
public bool CanResume { get; }
Property Value
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
disposingbooltrueif 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
elapsedTimedouble
Returns
Initialize()
To be called after the window is ready and the Engine needs to be set up
protected override bool Initialize()
Returns
- bool
trueif the initialization worked,falseif 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
namestring
ModifyMap(string)
Loads a game map and switches to live modification mode.
[UsedImplicitly]
public void ModifyMap(string name)
Parameters
namestring
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()