AlphaFramework API  1.0.3
Public Member Functions | Protected Member Functions | Properties | List of all members
AlphaFramework.World.SessionBase< TUniverse > Class Template Reference

A common base for game sessions (i.e. a game actually being played). More...

Public Member Functions

virtual double Update (double elapsedRealTime)
 Updates the underlying Universe. More...
 

Protected Member Functions

 SessionBase ()
 Base-constructor for XML serialization. Do not call manually! More...
 
 SessionBase (TUniverse baseUniverse)
 Creates a new game session based upon a given universe More...
 

Properties

TUniverse Universe [get]
 The current state of the game world. More...
 
string MapSourceFile [get]
 The filename of the map file the Universe was loaded from. More...
 
double TimeWarpFactor = 1 [get, set]
 The factor by which UniverseBase<TCoordinates>.GameTime progression should be multiplied in relation to real time. More...
 

Detailed Description

A common base for game sessions (i.e. a game actually being played).

Template Parameters
TUniverseThe specific type of IUniverse stored in the session.
Type Constraints
TUniverse :class 
TUniverse :IUniverse 

Constructor & Destructor Documentation

◆ SessionBase() [1/2]

AlphaFramework.World.SessionBase< TUniverse >.SessionBase ( )
inlineprotected

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

◆ SessionBase() [2/2]

AlphaFramework.World.SessionBase< TUniverse >.SessionBase ( TUniverse  baseUniverse)
inlineprotected

Creates a new game session based upon a given universe

Parameters
baseUniverseThe universe to base the new game session on.

Member Function Documentation

◆ Update()

virtual double AlphaFramework.World.SessionBase< TUniverse >.Update ( double  elapsedRealTime)
inlinevirtual

Updates the underlying Universe.

Parameters
elapsedRealTimeHow much real time in seconds has elapsed since this method was last called.
Returns
The elapsed game time (real time multiplied by TimeWarpFactor)

Property Documentation

◆ MapSourceFile

string AlphaFramework.World.SessionBase< TUniverse >.MapSourceFile
get

The filename of the map file the Universe was loaded from.

◆ TimeWarpFactor

double AlphaFramework.World.SessionBase< TUniverse >.TimeWarpFactor = 1
getset

The factor by which UniverseBase<TCoordinates>.GameTime progression should be multiplied in relation to real time.

◆ Universe

TUniverse AlphaFramework.World.SessionBase< TUniverse >.Universe
get

The current state of the game world.


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