Frame of Reference Game API  1.0.3
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
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, set]
 Manages all GUI dialogs displayed in the game More...
 
Session CurrentSession [get, set]
 The current game session More...
 
Presenter CurrentPresenter [get, set]
 The currently active presenter More...
 
GameState CurrentState [get, set]
 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

FrameOfReference.Game.Game ( )
inline

Creates a new game instance

Member Function Documentation

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

Lists the names of all stored Sessions.

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.
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
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
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.
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.
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.

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
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.
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

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

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

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

Presenter FrameOfReference.Game.CurrentPresenter
getset

The currently active presenter

Session FrameOfReference.Game.CurrentSession
getset

The current game session

GameState FrameOfReference.Game.CurrentState
getset

The current state of the game

GuiManager FrameOfReference.Game.GuiManager
getset

Manages all GUI dialogs displayed in the game


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