Frame of Reference Game API  1.0.3
Public Member Functions | Protected Member Functions | Properties | List of all members
FrameOfReference.Game Class Reference

Represents a running instance of the game More...

Inheritance diagram for FrameOfReference.Game:
OmegaEngine::GameBase

Public Member Functions

 Game ()
 Creates a new game instance More...
 
override void Run ()
 
override void Debug ()
 
override Lua NewLua ()
 
DialogRenderer LoadDialog (string name)
 Loads and displays a new dialog. More...
 
DialogRenderer LoadModalDialog (string name)
 Loads and displays a new modal (exclusivly focused) dialog. More...
 
DialogRenderer LoadSplashDialog (string name)
 Loads a new exclusive displayed splash-screen dialog. More...
 
void LoadMenu (string name)
 Loads a map into _menuUniverse and switches the CurrentState to GameState.Menu More...
 
void LoadMap (string name)
 Loads a game map into CurrentSession and switches the CurrentState to GameState.InGame More...
 
void ModifyMap (string name)
 Loads a game map into CurrentSession and switches the CurrentState to GameState.Modify More...
 
void SaveSavegame (string name)
 Saves the CurrentSession as a savegame stored in the user's profile. More...
 
void LoadSavegame (string name)
 Loads a savegame from user's profile to replace the CurrentSession. More...
 
IEnumerable< string > GetSavegameNames ()
 Lists the names of all stored Sessions. More...
 
void SwitchToMenu ()
 Switches to the main menu More...
 
void SwitchToGame ()
 Switches the game to in-game mode More...
 
void SwitchToModify ()
 Switches the game to map modification mode More...
 
void TogglePause ()
 Toggles CurrentState between GameState.InGame and GameState.Pause More...
 
- Public Member Functions inherited from OmegaEngine::GameBase
void Exit ()
 
void AddInputReceiver (IInputReceiver receiver)
 
void RemoveInputReceiver (IInputReceiver receiver)
 
void Dispose ()
 

Protected Member Functions

override void Dispose (bool disposing)
 
override void ResetEngine ()
 
override EngineConfig BuildEngineConfig (bool fullscreen)
 
override void ApplyGraphicsSettings ()
 
override bool Initialize ()
 
override void Render (double elapsedTime)
 
- Protected Member Functions inherited from OmegaEngine::GameBase
 GameBase (string name, Icon icon=null, Image background=null, bool stretch=false)
 
void ToFullscreen ()
 
void ToWindowed (Size size)
 
void UpdateStatus (string message)
 

Properties

GuiManager GuiManager [get]
 Manages all GUI dialogs displayed in the game More...
 
Session CurrentSession [get]
 The current game session More...
 
Presenter CurrentPresenter [get]
 The currently active presenter More...
 
GameState CurrentState [get]
 The current state of the game More...
 
- Properties inherited from OmegaEngine::GameBase
bool Disposed
 
Engine Engine
 
bool Fullscreen
 
bool? Loading
 
KeyboardInputProvider KeyboardInputProvider
 
MouseInputProvider MouseInputProvider
 
TouchInputProvider TouchInputProvider
 

Additional Inherited Members

- Static Public Member Functions inherited from OmegaEngine::GameBase
static void Crash ()
 
- Protected Attributes inherited from OmegaEngine::GameBase
readonly GameForm Form
 

Detailed Description

Represents a running instance of the game

Constructor & Destructor Documentation

◆ Game()

FrameOfReference.Game.Game ( )
inline

Creates a new game instance

Member Function Documentation

◆ GetSavegameNames()

IEnumerable<string> FrameOfReference.Game.GetSavegameNames ( )
inline

Lists the names of all stored Sessions.

◆ LoadDialog()

DialogRenderer FrameOfReference.Game.LoadDialog ( string  name)
inline

Loads and displays a new dialog.

Parameters
nameThe XML file to load from.
Returns
The newly created dialog.

◆ LoadMap()

void FrameOfReference.Game.LoadMap ( string  name)
inline

Loads a game map into CurrentSession and switches the CurrentState to GameState.InGame

Parameters
nameThe name of the map to load

◆ LoadMenu()

void FrameOfReference.Game.LoadMenu ( string  name)
inline

Loads a map into _menuUniverse and switches the CurrentState to GameState.Menu

Parameters
nameThe name of the map to load

◆ LoadModalDialog()

DialogRenderer FrameOfReference.Game.LoadModalDialog ( string  name)
inline

Loads and displays a new modal (exclusivly focused) dialog.

Parameters
nameThe XML file to load from.
Returns
The newly created dialog.

◆ LoadSavegame()

void FrameOfReference.Game.LoadSavegame ( string  name)
inline

Loads a savegame from user's profile to replace the CurrentSession.

Parameters
nameThe name of the savegame to load.

◆ LoadSplashDialog()

DialogRenderer FrameOfReference.Game.LoadSplashDialog ( string  name)
inline

Loads a new exclusive displayed splash-screen dialog.

Parameters
nameThe XML file to load from
Returns
The newly created dialog.

Calling this method will close all other DialogRenderers.

◆ ModifyMap()

void FrameOfReference.Game.ModifyMap ( string  name)
inline

Loads a game map into CurrentSession and switches the CurrentState to GameState.Modify

Parameters
nameThe name of the map to load

◆ SaveSavegame()

void FrameOfReference.Game.SaveSavegame ( string  name)
inline

Saves the CurrentSession as a savegame stored in the user's profile.

Parameters
nameThe name of the savegame to write.

◆ SwitchToGame()

void FrameOfReference.Game.SwitchToGame ( )
inline

Switches the game to in-game mode

If CurrentState is already GameState.InGame, nothing will happen. Loading may take a while, subsequent calls will be a bit faster because the Engine cache will still be hot

◆ SwitchToMenu()

void FrameOfReference.Game.SwitchToMenu ( )
inline

Switches to the main menu

If CurrentState is already GameState.Menu, nothing will happen. Loading will take a while on first call, subsequent calls will be very fast, because _menuUniverse is preserved

◆ SwitchToModify()

void FrameOfReference.Game.SwitchToModify ( )
inline

Switches the game to map modification mode

If CurrentState is already GameState.Modify, nothing will happen. Loading may take a while, subsequent calls will be a bit faster because the Engine cache will still be hot

◆ TogglePause()

void FrameOfReference.Game.TogglePause ( )
inline

Toggles CurrentState between GameState.InGame and GameState.Pause

When called while CurrentState is neither GameState.InGame nor GameState.Pause nothing happens

Property Documentation

◆ CurrentPresenter

Presenter FrameOfReference.Game.CurrentPresenter
get

The currently active presenter

◆ CurrentSession

Session FrameOfReference.Game.CurrentSession
get

The current game session

◆ CurrentState

GameState FrameOfReference.Game.CurrentState
get

The current state of the game

◆ GuiManager

GuiManager FrameOfReference.Game.GuiManager
get

Manages all GUI dialogs displayed in the game


The documentation for this class was generated from the following files: