AlphaFramework API  1.0.3
Public Member Functions | Protected Member Functions | Properties | Events | List of all members
AlphaFramework.World.UniverseBase< TCoordinates > Class Template Referenceabstract

A common base for game worlds (but not a running game). Equivalent to the content of a map file. More...

Inheritance diagram for AlphaFramework.World.UniverseBase< TCoordinates >:
AlphaFramework.World.IUniverse

Public Member Functions

virtual void Update (double elapsedGameTime)
 Updates the UniverseBase<TCoordinates> and all Positionable<TCoordinates>s in it.
 
abstract void Save (string path)
 Saves this UniverseBase<TCoordinates> in a compressed XML file (map file).
 
void Save ()
 Overwrites the map file this UniverseBase<TCoordinates> was loaded from with the changed data.
 

Protected Member Functions

virtual void Update (IUpdateable updateable, double elapsedGameTime)
 Updates a single IUpdateable. More...
 

Properties

double GameTime [get, set]
 Total elapsed game time in seconds. More...
 
abstract MonitoredCollection< Positionable< TCoordinates > > Positionables [get]
 A collection of all Positionable<TCoordinates>s in this UniverseBase<TCoordinates>. More...
 
IPathfinder< TCoordinates > Pathfinder [get, set]
 The pathfinding engine used to navigate Positionables. More...
 
string Skybox [get, set]
 The name of the skybox to use for this map; may be null or empty. More...
 
CameraState< TCoordinates > CurrentCamera [get, set]
 The current position and direction of the camera in the game. More...
 
string SourceFile [get, set]
 
- Properties inherited from AlphaFramework.World.IUniverse
string SourceFile [get, set]
 The map file this world was loaded from. More...
 

Events

Action SkyboxChanged
 Occurs when Skybox was changed. More...
 

Detailed Description

A common base for game worlds (but not a running game). Equivalent to the content of a map file.

Template Parameters
TCoordinatesData type for storing position coordinates of objects in the game world.
Type Constraints
TCoordinates :struct 

Member Function Documentation

◆ Update()

virtual void AlphaFramework.World.UniverseBase< TCoordinates >.Update ( IUpdateable  updateable,
double  elapsedGameTime 
)
inlineprotectedvirtual

Updates a single IUpdateable.

Property Documentation

◆ CurrentCamera

CameraState<TCoordinates> AlphaFramework.World.UniverseBase< TCoordinates >.CurrentCamera
getset

The current position and direction of the camera in the game.

This is updated only when leaving the game, not continuously.

◆ GameTime

double AlphaFramework.World.UniverseBase< TCoordinates >.GameTime
getset

Total elapsed game time in seconds.

◆ Pathfinder

IPathfinder<TCoordinates> AlphaFramework.World.UniverseBase< TCoordinates >.Pathfinder
getset

The pathfinding engine used to navigate Positionables.

◆ Positionables

abstract MonitoredCollection<Positionable<TCoordinates> > AlphaFramework.World.UniverseBase< TCoordinates >.Positionables
get

A collection of all Positionable<TCoordinates>s in this UniverseBase<TCoordinates>.

◆ Skybox

string AlphaFramework.World.UniverseBase< TCoordinates >.Skybox
getset

The name of the skybox to use for this map; may be null or empty.

Event Documentation

◆ SkyboxChanged

Action AlphaFramework.World.UniverseBase< TCoordinates >.SkyboxChanged

Occurs when Skybox was changed.


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