Photon Quantum 3.0.0

Public Member Functions | Protected Member Functions | List of all members
Quantum.SystemMainThread Class Referenceabstract

Most common Quantum system type. Implements a regular Update() with all the usual features. More...

Inheritance diagram for Quantum.SystemMainThread:
Quantum.SystemBase Quantum.Core.PlayerConnectedSystem Quantum.SystemMainThreadFilter< T > Quantum.SystemMainThreadGroup

Public Member Functions

 SystemMainThread ()
 Create a new system. More...
 
 SystemMainThread (string name)
 Create a new system with a custom name. More...
 
abstract void Update (Frame f)
 Override to add workload. More...
 
- Public Member Functions inherited from Quantum.SystemBase
 SystemBase ()
 Constructor. More...
 
 SystemBase (string scheduleSample)
 Create a new instance and setting the sample name. More...
 
virtual void OnDisabled (Frame f)
 Is called when the system was disabled for example after Frame.SystemDisable(Type). More...
 
virtual void OnEnabled (Frame f)
 Is called when the system was enabled for example after calling Frame.SystemEnable<T>() or during QuantumGame.InitSystems(Photon.Deterministic.DeterministicFrame). More...
 
virtual void OnInit (Frame f)
 Is called when the system is initialized. More...
 
TaskHandle OnSchedule (Frame f, TaskHandle taskHandle)
 Creates the task graph for the system. More...
 

Protected Member Functions

override TaskHandle Schedule (Frame f, TaskHandle taskHandle)
 Override to add additional tasks. More...
 
TaskHandle ScheduleUpdate (Frame f, TaskHandle taskHandle)
 Adds the basic update callback. More...
 

Additional Inherited Members

- Properties inherited from Quantum.SystemBase
virtual IEnumerable< SystemBaseChildSystems [get]
 The enumerable child systems. More...
 
IEnumerable< SystemBaseHierarchy [get]
 Creates the complete sub graph of child systems. More...
 
SystemBase ParentSystem [get]
 The parent system in the system hierarchy. More...
 
Int32 RuntimeIndex [get, set]
 A unique index assigned to identify systems at runtime. More...
 
virtual Boolean StartEnabled [get, set]
 Set to true when the simulation should start with this system enabled. More...
 

Detailed Description

Most common Quantum system type. Implements a regular Update() with all the usual features.

Always register new system types on the SystemsConfig.

Constructor & Destructor Documentation

◆ SystemMainThread() [1/2]

Quantum.SystemMainThread.SystemMainThread ( )
inline

Create a new system.

◆ SystemMainThread() [2/2]

Quantum.SystemMainThread.SystemMainThread ( string  name)
inline

Create a new system with a custom name.

Parameters
nameThe system name shows up in the task profiler for example.

Member Function Documentation

◆ ScheduleUpdate()

TaskHandle Quantum.SystemMainThread.ScheduleUpdate ( Frame  f,
TaskHandle  taskHandle 
)
inlineprotected

Adds the basic update callback.

Parameters
fThe referenced frame.
taskHandleThe initial task handle.
Returns
The final task graph.

◆ Schedule()

override TaskHandle Quantum.SystemMainThread.Schedule ( Frame  f,
TaskHandle  taskHandle 
)
inlineprotectedvirtual

Override to add additional tasks.

Parameters
fThe referenced frame.
taskHandleThe initial task handle.
Returns
The final task graph.

Implements Quantum.SystemBase.

Reimplemented in Quantum.SystemMainThreadGroup.

◆ Update()

abstract void Quantum.SystemMainThread.Update ( Frame  f)
pure virtual

Override to add workload.

Parameters
fThe current fame.

Implemented in Quantum.SystemMainThreadGroup, Quantum.SystemMainThreadFilter< T >, and Quantum.Core.PlayerConnectedSystem.