Frame of Reference Game API
1.0.3
|
Represents a world with a height-map based Terrain. More...
Public Member Functions | |
Universe (Terrain< TerrainTemplate > terrain) | |
Creates a new Universe with a terrain. More... | |
override void | Update (double elapsedGameTime) |
Entity | GetEntity (string name) |
Retrieves an Entity from Positionables by its name. More... | |
Trigger | GetTrigger (string name) |
Retrieves an Trigger from Positionables by its name. More... | |
CameraState< Vector2 > | GetCamera (string name) |
Retrieves an CameraState<TCoordinates> from Positionables by its name. More... | |
void | PlayerMove (Entity entity, Vector2 target) |
Makes a player-controlled Entity move towards a target . More... | |
void | MakePlayerControlled (string name) |
Turns a specific Entity into a player-controlled character. More... | |
void | MakeAllNpc () |
Turns all Entitys into NPCs. More... | |
void | UnwrapWaypoints () |
Moves Waypoint from Entity.Waypoints to UniverseBase<TCoordinates>.Positionables. Call to prepare for editing. More... | |
Universe () | |
Base-constructor for XML serialization. Do not call manually! More... | |
override void | Save (string path) |
Static Public Member Functions | |
static Universe | Load (string path) |
Loads a Universe from a compressed XML file (map file). More... | |
static Universe | FromContent (string id) |
Loads a Universe from the game content source via the ContentManager. More... | |
Public Attributes | |
override MonitoredCollection< Positionable< Vector2 > > | Positionables => _positionables |
const string | FileExt = "." + GeneralSettings.AppNameShort + "Map" |
The file extensions when this class is stored as a file. More... | |
Protected Member Functions | |
override void | Update (IUpdateable updateable, double elapsedGameTime) |
Properties | |
Terrain< TerrainTemplate > | Terrain [get, set] |
The Terrain on which Entitys are placed. More... | |
float | LightPhase [get, set] |
A value between 0 and 4 representing the current sun and moon positions. (0 = dawn, 1 = noon, 2 = dusk, 3 = midnight) More... | |
float | LightPhaseSpeedFactor = 1 / 40f [get, set] |
The speed with which the LightPhase is incremented. More... | |
Color | AmbientColor [get, set] |
The color of the ambient light (background light that is always visible and has no direction). More... | |
XColor | AmbientColorValue [get, set] |
Used for XML serialization. More... | |
Color | SunColor [get, set] |
The color of the diffuse light (normal directional light) of the sun. More... | |
XColor | SunColorValue [get, set] |
Used for XML serialization. More... | |
float | SunInclination [get, set] |
The angle of inclination of the sun's path away from the horizon towards south in degrees. More... | |
Color | MoonColor [get, set] |
The color of the diffuse light (normal directional light) of the second moon. More... | |
XColor | MoonColorValue [get, set] |
Used for XML serialization. More... | |
float | MoonInclination [get, set] |
The angle of inclination of the second moon's path away from the horizon towards south in degrees. More... | |
ColorCorrection | ColorCorrectionDawn [get, set] |
Color correction values to apply at dawn. More... | |
ColorCorrection | ColorCorrectionNoon [get, set] |
Color correction values to apply at noon. More... | |
ColorCorrection | ColorCorrectionDusk [get, set] |
Color correction values to apply at dusk. More... | |
ColorCorrection | ColorCorrectionMidnight [get, set] |
Color correction values to apply at midnight. More... | |
bool | Fog [get, set] |
Is the fog active? More... | |
float | FogDistance [get, set] |
The maximum distance one can look through the fog. More... | |
Color | FogColor [get, set] |
The color of the fog. More... | |
XColor | FogColorValue [get, set] |
Used for XML serialization. More... | |
bool | Bleach [get, set] |
Is the fog active? More... | |
int | MaxTraversableSlope [get, set] |
The maximum slope the IPathfinder<TCoordinates> considers traversable. More... | |
Terrain< TerrainTemplate > | TerrainSerialize [get, set] |
Used for XML serialization. More... | |
Events | |
Action | LightingChanged |
Occurs when LightPhase, AmbientColor, SunColor, ColorCorrectionDawn, ColorCorrectionNoon or ColorCorrectionDusk, ColorCorrectionMidnight was changed. More... | |
Represents a world with a height-map based Terrain.
|
inline |
|
inline |
Base-constructor for XML serialization. Do not call manually!
|
inlinestatic |
|
inline |
Retrieves an CameraState<TCoordinates> from Positionables by its name.
null
if there is no match.
|
inline |
Retrieves an Entity from Positionables by its name.
null
if there is no match.
|
inline |
Retrieves an Trigger from Positionables by its name.
null
if there is no match.
|
inlinestatic |
Loads a Universe from a compressed XML file (map file).
path | The file to load from. |
IOException | A problem occurred while reading the file. |
UnauthorizedAccessException | Read access to the file is not permitted. |
InvalidOperationException | A problem occurred while deserializing the XML data. |
|
inline |
Turns all Entitys into NPCs.
|
inline |
Turns a specific Entity into a player-controlled character.
|
inline |
Makes a player-controlled Entity move towards a target .
|
inline |
Moves Waypoint from Entity.Waypoints to UniverseBase<TCoordinates>.Positionables. Call to prepare for editing.
const string FrameOfReference.World.Universe.FileExt = "." + GeneralSettings.AppNameShort + "Map" |
The file extensions when this class is stored as a file.
|
getset |
The color of the ambient light (background light that is always visible and has no direction).
Is not serialized/stored, AmbientColorValue is used for that.
|
getset |
Used for XML serialization.
|
getset |
Is the fog active?
|
getset |
Color correction values to apply at dawn.
|
getset |
Color correction values to apply at dusk.
|
getset |
Color correction values to apply at midnight.
|
getset |
Color correction values to apply at noon.
|
getset |
Is the fog active?
|
getset |
The color of the fog.
Is not serialized/stored, FogColorValue is used for that.
|
getset |
Used for XML serialization.
|
getset |
The maximum distance one can look through the fog.
|
getset |
A value between 0 and 4 representing the current sun and moon positions. (0 = dawn, 1 = noon, 2 = dusk, 3 = midnight)
|
getset |
The speed with which the LightPhase is incremented.
|
getset |
The maximum slope the IPathfinder<TCoordinates> considers traversable.
|
getset |
The color of the diffuse light (normal directional light) of the second moon.
Is not serialized/stored, MoonColorValue is used for that.
|
getset |
Used for XML serialization.
|
getset |
The angle of inclination of the second moon's path away from the horizon towards south in degrees.
|
getset |
The color of the diffuse light (normal directional light) of the sun.
Is not serialized/stored, SunColorValue is used for that.
|
getset |
Used for XML serialization.
|
getset |
The angle of inclination of the sun's path away from the horizon towards south in degrees.
|
getset |
The Terrain on which Entitys are placed.
InvalidOperationException | The Terrain could not be properly loaded from the file. |
Is not serialized/stored, TerrainSerialize is used for that.
|
getset |
Used for XML serialization.
Action FrameOfReference.World.Universe.LightingChanged |
Occurs when LightPhase, AmbientColor, SunColor, ColorCorrectionDawn, ColorCorrectionNoon or ColorCorrectionDusk, ColorCorrectionMidnight was changed.