Table of Contents

Class UniverseBase

Namespace
AlphaFramework.World
Assembly
AlphaFramework.World.dll

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

public abstract class UniverseBase : IUniverse
Inheritance
UniverseBase
Implements
Derived
CoordinateUniverse<TCoordinates>
Inherited Members
Extension Methods

Properties

GameTime

Total elapsed game time in seconds.

public double GameTime { get; set; }

Property Value

double

Skybox

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

public string? Skybox { get; set; }

Property Value

string

SourceFile

The map file this world was loaded from.

[Browsable(false)]
public string? SourceFile { get; set; }

Property Value

string

Remarks

Is not serialized/stored, is set by whatever method loads the universe.

Methods

Save(string)

Saves this CoordinateUniverse<TCoordinates> in a map file.

public virtual void Save(string path)

Parameters

path string

The file to save in.

Exceptions

IOException

A problem occurred while writing the file.

UnauthorizedAccessException

Write access to the file is not permitted.

Update(double)

Updates the universe.

public virtual void Update(double elapsedGameTime)

Parameters

elapsedGameTime double

How much game time in seconds has elapsed since this method was last called.

Events

SkyboxChanged

Occurs when Skybox was changed.

public event Action? SkyboxChanged

Event Type

Action