Frame of Reference Game API  1.0.3
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Public Member Functions | Static Public Member Functions | Public Attributes | Properties | List of all members
FrameOfReference.World.Session Class Reference

Represents a game session (i.e. a game actually being played). It is equivalent to the content of a savegame. More...

Inheritance diagram for FrameOfReference.World.Session:

Public Member Functions

 Session (Universe baseUniverse)
 Creates a new game session based upon a given Universe. More...
 
override double Update (double elapsedRealTime)
 
void UpdateTo (double gameTime)
 Updates the world to a specific point in game time. More...
 
 Session ()
 Base-constructor for XML serialization. Do not call manually! More...
 
void Save (string path)
 Saves this Session in an encrypted XML file (savegame). More...
 
void TimeTravel (double gameTime)
 Like UpdateTo, but interpolates between the current and the target time smoothly. More...
 

Static Public Member Functions

static Session Load (string path)
 Loads a Session from a encrypted XML file (savegame). More...
 

Public Attributes

const string FileExt = "." + GeneralSettings.AppNameShort + "Save"
 The file extensions when this class is stored as a file. More...
 

Properties

Lua Lua [get, set]
 The scripting engine used to execute story scripts. More...
 
double LeftoverGameTime [get, set]
 UniverseBase{T}.GameTime time left over from the last Update call due to the fixed update step size. More...
 
bool TimeTravelInProgress [get, set]
 Indicates whwther a TimeTravel request is currently being processed. More...
 

Detailed Description

Represents a game session (i.e. a game actually being played). It is equivalent to the content of a savegame.

Constructor & Destructor Documentation

FrameOfReference.World.Session.Session ( Universe  baseUniverse)
inline

Creates a new game session based upon a given Universe.

Parameters
baseUniverseThe universe to base the new game session on.
FrameOfReference.World.Session.Session ( )
inline

Base-constructor for XML serialization. Do not call manually!

Member Function Documentation

static Session FrameOfReference.World.Session.Load ( string  path)
inlinestatic

Loads a Session from a encrypted XML file (savegame).

Parameters
pathThe file to load from.
Returns
The loaded Session.
Exceptions
IOExceptionA problem occurred while reading the file.
UnauthorizedAccessExceptionRead access to the file is not permitted.
InvalidOperationExceptionA problem occurred while deserializing the XML data.
void FrameOfReference.World.Session.Save ( string  path)
inline

Saves this Session in an encrypted XML file (savegame).

Parameters
pathThe file to save in.
Exceptions
IOExceptionA problem occurred while writing the file.
UnauthorizedAccessExceptionWrite access to the file is not permitted.
void FrameOfReference.World.Session.TimeTravel ( double  gameTime)
inline

Like UpdateTo, but interpolates between the current and the target time smoothly.

Parameters
gameTimeThe target value for UniverseBase{TCoordinates}.GameTime.
void FrameOfReference.World.Session.UpdateTo ( double  gameTime)
inline

Updates the world to a specific point in game time.

Parameters
gameTimeThe target value for UniverseBase{TCoordinates}.GameTime.

Member Data Documentation

const string FrameOfReference.World.Session.FileExt = "." + GeneralSettings.AppNameShort + "Save"

The file extensions when this class is stored as a file.

Property Documentation

double FrameOfReference.World.Session.LeftoverGameTime
getset

UniverseBase{T}.GameTime time left over from the last Update call due to the fixed update step size.

Lua FrameOfReference.World.Session.Lua
getset

The scripting engine used to execute story scripts.

bool FrameOfReference.World.Session.TimeTravelInProgress
getset

Indicates whwther a TimeTravel request is currently being processed.


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