This class implements the IDeterministicSessionRunner interface and contains code to glue together the Quantum server and Quantum session runner. This was formerly part of the Quantum Server SDK. The class will also work without running the server simulation only as wrapper for access to custom simulation code as resource manager and command serialization for example. More...
Inherits IDeterministicSessionRunner.
Public Member Functions | |
AssetGuid | AddInitialDynamicAsset (AssetObject asset) |
Add an initial dynamic asset. Needs to be performed before the simulation starts. Use DeterministicServer.OnDeterministicSessionCanStart(). More... | |
void | Service (double gameTime) |
Implements the server update callback. More... | |
void | Shutdown () |
Disposes the Quantum runner. More... | |
void | Start (DeterministicSessionRunnerStartArguments args) |
Implements the start of the Quantum online session. Instantiates a Quantum runner. More... | |
bool | TryCreateSnapshot (ref int tick, ref byte[] data) |
Implements the server snapshot requested callback. This will use the most recent simulated frame on the server to use as a snapshot for late-joining clients. Which will bypass requesting buddy snapshots from other clients. More... | |
Public Attributes | |
object | CallbackDispatcher => _callbackDispatcher |
Access Quantum callbacks. More... | |
object | EventDispatcher => _eventDispatcher |
Access Quantum events. More... | |
DynamicAssetDB | InitialDynamicAssetDB => _dynamicAssetDB |
Access the initial dynamic asset db, gets created after AddInitialDynamicAsset(AssetObject) was used. Will be disposed and nulled after Start(DeterministicSessionRunnerStartArguments). More... | |
SessionRunner | Runner => _runner |
Grants access to the Quantum session runner. More... | |
DeterministicSession | Session => Runner?.Session |
Returns the session. More... | |
Properties | |
IAssetSerializer | AssetSerializer [get, set] |
Get and set the AssetSerializer directly after IDeterministicSessionRunner creation, until it is possible to pass it internally. More... | |
Action< byte[]> | OnGameResult [get, set] |
Callback raised on game result events from the simulation. More... | |
This class implements the IDeterministicSessionRunner interface and contains code to glue together the Quantum server and Quantum session runner. This was formerly part of the Quantum Server SDK. The class will also work without running the server simulation only as wrapper for access to custom simulation code as resource manager and command serialization for example.
|
inline |
Add an initial dynamic asset. Needs to be performed before the simulation starts. Use DeterministicServer.OnDeterministicSessionCanStart().
asset | Asset to add to initial dynamic asset db. |
|
inline |
Disposes the Quantum runner.
|
inline |
Implements the start of the Quantum online session. Instantiates a Quantum runner.
args | Start arguments |
|
inline |
Implements the server update callback.
gameTime | Game time in seconds |
|
inline |
Implements the server snapshot requested callback. This will use the most recent simulated frame on the server to use as a snapshot for late-joining clients. Which will bypass requesting buddy snapshots from other clients.
tick | The tick of the snapshot. |
data | DeterministicFrame object serialized. |
DynamicAssetDB Quantum.DotNetSessionRunner.InitialDynamicAssetDB => _dynamicAssetDB |
Access the initial dynamic asset db, gets created after AddInitialDynamicAsset(AssetObject) was used. Will be disposed and nulled after Start(DeterministicSessionRunnerStartArguments).
SessionRunner Quantum.DotNetSessionRunner.Runner => _runner |
Grants access to the Quantum session runner.
object Quantum.DotNetSessionRunner.EventDispatcher => _eventDispatcher |
Access Quantum events.
object Quantum.DotNetSessionRunner.CallbackDispatcher => _callbackDispatcher |
Access Quantum callbacks.
DeterministicSession Quantum.DotNetSessionRunner.Session => Runner?.Session |
Returns the session.
|
getset |
Get and set the AssetSerializer directly after IDeterministicSessionRunner creation, until it is possible to pass it internally.
|
getset |
Callback raised on game result events from the simulation.