Table of Contents

Class ExtensionSystem

Namespace
NominalSystems.Universe
Assembly
NominalSystems.Universe.dll

[Nominal] The extension system is able to handle custom ticking functionality for use with the API and any other form. It just enables the ability to tick at a specific interval.


public class ExtensionSystem : UniverseSystem
Inheritance
ExtensionSystem
Extension Methods

Constructors

ExtensionSystem()

Default constructor

protected ExtensionSystem()

Methods

GetSimulationTime()

Returns the simulation time in seconds

public double GetSimulationTime()

Returns

double

[s] The current simulation time

GetState()

Returns the current simulation state as a JSON object

public JObject GetState()

Returns

JObject

The state of the simulation

InitializeSimulation()

Initializes the simulation by updating the universe event controller. This will ensure that the simulation is correctly initialized and an update step is called on all components for the purpose of the saving and loading system.

public void InitializeSimulation()

SetState(JObject)

Sets the simulation state from a JSON object

public bool SetState(JObject state)

Parameters

state JObject

The state of the simulation

Returns

bool

A successful load

TickIterations(int, double)

Ticks the simulation with a certain number of iterations safely, ensuring that it does not take too long to complete. It will also return the number of iterations completed.

public int TickIterations(int iterations = 1, double step = 0.1)

Parameters

iterations int

The desired number of iterations

step double

[s] The step-size of the simulation tick

Returns

int

The number of iterations actually completed