Class EngineSystem

Namespace
Elegy.Framework
Assembly
Elegy.Framework.dll

The engine framework. Launches and shuts down subsystems.

public static class EngineSystem
Inheritance
EngineSystem
Inherited Members

Fields

MajorVersion

Elegy Engine major version, used for version checking against plugins.

public const int MajorVersion = 0

Field Value

int

MinorVersion

Elegy Engine minor version, used for version checking against plugins.

public const int MinorVersion = 1

Field Value

int

OldestSupportedMinor

Plugins built before this minor version will not work.

public const int OldestSupportedMinor = 0

Field Value

int

VersionString

Version string to be displayed when the engine starts up.

public static readonly string VersionString

Field Value

string

Properties

IsRunning

Is the engine running?

public static bool IsRunning { get; }

Property Value

bool

ShutdownReason

The reason of shutdown. Might be an error.

public static string? ShutdownReason { get; }

Property Value

string

StartupTime

Time the engine started.

public static DateTime StartupTime { get; }

Property Value

DateTime

Methods

Init(LaunchConfig, Func<LaunchConfig, bool>, Func<bool>, Action, Func<string?>)

Initialises the engine's systems.

public static bool Init(LaunchConfig config, Func<LaunchConfig, bool> systemInitFunc, Func<bool> systemPostInitFunc, Action systemShutdownFunc, Func<string?> systemErrorFunc)

Parameters

config LaunchConfig
systemInitFunc Func<LaunchConfig, bool>
systemPostInitFunc Func<bool>
systemShutdownFunc Action
systemErrorFunc Func<string>

Returns

bool

Shutdown(string)

Shuts down the engine.

public static bool Shutdown(string why = "")

Parameters

why string

The reason of shutdown. If left empty, it is a normal shutdown, else an error.

Returns

bool