![]() |
Paradox Game Engine
v1.0.0 beta06
|
The script system handles scripts scheduling in a game. More...
Public Member Functions | |
ScriptSystem (IServiceRegistry registry) | |
Initializes a new instance of the GameSystemBase class. More... | |
override void | Update (GameTime gameTime) |
This method is called when this game component is updated. More... | |
ChannelMicroThreadAwaiter< int > | NextFrame () |
Allows to wait for next frame. More... | |
MicroThread | Add (Func< Task > microThreadFunction) |
Adds the specified micro thread function. More... | |
MicroThread | Add (IScript script) |
Adds the specified script. More... | |
async Task | WhenAll (params MicroThread[] microThreads) |
Waits all micro thread finished their task completion. More... | |
![]() | |
virtual bool | BeginDraw () |
Starts the drawing of a frame. This method is followed by calls to Draw and EndDraw. More... | |
virtual void | Draw (GameTime gameTime) |
Draws this instance. More... | |
virtual void | EndDraw () |
Ends the drawing of a frame. This method is preceeded by calls to Draw and BeginDraw. More... | |
virtual void | Initialize () |
This method is called when the component is added to the game. More... | |
![]() | |
void | Dispose () |
override string | ToString () |
Properties | |
Scheduler | Scheduler [get, set] |
Gets the scheduler. More... | |
![]() | |
GameBase | Game [get] |
Gets the Game associated with this GameSystemBase. This value can be null in a mock environment. More... | |
IServiceRegistry | Services [get] |
Gets the services registry. More... | |
IAssetManager | Asset [get] |
Gets the content manager. More... | |
GraphicsDevice | GraphicsDevice [get] |
Gets the graphics device. More... | |
bool | Visible [get, set] |
int | DrawOrder [get, set] |
bool | Enabled [get, set] |
int | UpdateOrder [get, set] |
![]() | |
long | Id [get, set] |
string | Name [get, set] |
Gets or sets the name of this component. More... | |
bool | IsDisposed [get, set] |
Has the component been disposed or not yet. More... | |
![]() | |
long | Id [get] |
Gets the id of this component. More... | |
string | Name [get] |
Gets the name of this component. More... | |
![]() | |
int | ReferenceCount [get] |
Gets the reference count of this instance. More... | |
![]() | |
ObjectCollector | Collector [get] |
Gets the collector. More... | |
![]() | |
bool | Enabled [get] |
Gets a value indicating whether the game component's Update method should be called by GameBase.Update. More... | |
int | UpdateOrder [get] |
Gets the update order relative to other game components. Lower values are updated first. More... | |
![]() | |
bool | Visible [get] |
Gets a value indicating whether the Draw method should be called by GameBase.Draw. More... | |
int | DrawOrder [get] |
Gets the draw order relative to other objects. IDrawable objects with a lower value are drawn first. More... | |
Additional Inherited Members | |
![]() | |
PropertyContainer | Tags |
Gets the attached properties to this component. More... | |
![]() | |
GameSystemBase (IServiceRegistry registry) | |
Initializes a new instance of the GameSystemBase class. More... | |
virtual void | OnDrawOrderChanged (object source, EventArgs e) |
virtual void | OnUpdateOrderChanged (object source, EventArgs e) |
virtual void | LoadContent () |
Loads the assets. More... | |
virtual void | UnloadContent () |
Called when graphics resources need to be unloaded. Override this method to unload any game-specific graphics resources. More... | |
![]() | |
ComponentBase () | |
Initializes a new instance of the ComponentBase class. More... | |
ComponentBase (string name) | |
Initializes a new instance of the ComponentBase class. More... | |
virtual void | OnNameChanged () |
Called when Name property was changed. More... | |
virtual void | Destroy () |
Disposes of object resources. More... | |
![]() | |
EventHandler< EventArgs > | DrawOrderChanged |
EventHandler< EventArgs > | VisibleChanged |
EventHandler< EventArgs > | EnabledChanged |
EventHandler< EventArgs > | UpdateOrderChanged |
![]() | |
EventHandler< EventArgs > | EnabledChanged |
Occurs when the Enabled property changes. More... | |
EventHandler< EventArgs > | UpdateOrderChanged |
Occurs when the UpdateOrder property changes. More... | |
![]() | |
EventHandler< EventArgs > | DrawOrderChanged |
Occurs when the DrawOrder property changes. More... | |
EventHandler< EventArgs > | VisibleChanged |
Occurs when the Visible property changes. More... | |
The script system handles scripts scheduling in a game.
Definition at line 16 of file ScriptSystem.cs.
SiliconStudio.Paradox.ScriptSystem.ScriptSystem | ( | IServiceRegistry | registry | ) |
Initializes a new instance of the GameSystemBase class.
registry | The registry. |
The GameSystem is expecting the following services to be registered: IGame and AssetManager.
Definition at line 29 of file ScriptSystem.cs.
MicroThread SiliconStudio.Paradox.ScriptSystem.Add | ( | Func< Task > | microThreadFunction | ) |
Adds the specified micro thread function.
microThreadFunction | The micro thread function. |
Definition at line 56 of file ScriptSystem.cs.
MicroThread SiliconStudio.Paradox.ScriptSystem.Add | ( | IScript | script | ) |
Adds the specified script.
script | The script. |
Definition at line 66 of file ScriptSystem.cs.
ChannelMicroThreadAwaiter<int> SiliconStudio.Paradox.ScriptSystem.NextFrame | ( | ) |
Allows to wait for next frame.
Definition at line 46 of file ScriptSystem.cs.
|
virtual |
This method is called when this game component is updated.
gameTime | The current timing. |
Reimplemented from SiliconStudio.Paradox.Games.GameSystemBase.
Definition at line 37 of file ScriptSystem.cs.
async Task SiliconStudio.Paradox.ScriptSystem.WhenAll | ( | params MicroThread[] | microThreads | ) |
Waits all micro thread finished their task completion.
microThreads | The micro threads. |
Definition at line 76 of file ScriptSystem.cs.
|
getset |