Class SessionBase<TUniverse>
- Namespace
- AlphaFramework.World
- Assembly
- AlphaFramework.World.dll
A common base for game sessions (i.e. a game actually being played).
public abstract class SessionBase<TUniverse> where TUniverse : class, IUniverse
Type Parameters
TUniverse
The specific type of IUniverse stored in the session.
- Inheritance
-
SessionBase<TUniverse>
- Derived
- Inherited Members
- Extension Methods
Constructors
SessionBase()
Base-constructor for XML serialization. Do not call manually!
protected SessionBase()
SessionBase(TUniverse)
Creates a new game session based upon a given universe
protected SessionBase(TUniverse baseUniverse)
Parameters
baseUniverse
TUniverseThe universe to base the new game session on.
Properties
MapSourceFile
The filename of the map file the Universe was loaded from.
public string MapSourceFile { get; set; }
Property Value
TimeWarpFactor
The factor by which GameTime progression should be multiplied in relation to real time.
public double TimeWarpFactor { get; set; }
Property Value
Universe
The current state of the game world.
[LuaHide]
public TUniverse Universe { get; set; }
Property Value
- TUniverse
Methods
Update(double)
Updates the underlying Universe.
public virtual double Update(double elapsedRealTime)
Parameters
elapsedRealTime
doubleHow much real time in seconds has elapsed since this method was last called.
Returns
- double
The elapsed game time (real time multiplied by TimeWarpFactor)