Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
SiliconStudio.Paradox.ScriptSystem Class Reference

The script system handles scripts scheduling in a game. More...

Inheritance diagram for SiliconStudio.Paradox.ScriptSystem:
SiliconStudio.Paradox.Games.GameSystemBase SiliconStudio.Core.ComponentBase SiliconStudio.Paradox.Games.IGameSystemBase SiliconStudio.Paradox.Games.IUpdateable SiliconStudio.Paradox.Games.IDrawable SiliconStudio.Paradox.Games.IContentable SiliconStudio.Core.IComponent SiliconStudio.Core.ICollectorHolder SiliconStudio.Core.IReferencable SiliconStudio.Core.IComponent SiliconStudio.Core.IReferencable SiliconStudio.Core.IReferencable

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...
 
- Public Member Functions inherited from SiliconStudio.Paradox.Games.GameSystemBase
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...
 
- Public Member Functions inherited from SiliconStudio.Core.ComponentBase
void Dispose ()
 
override string ToString ()
 

Properties

Scheduler Scheduler [get, set]
 Gets the scheduler. More...
 
- Properties inherited from SiliconStudio.Paradox.Games.GameSystemBase
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]
 
- Properties inherited from SiliconStudio.Core.ComponentBase
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...
 
- Properties inherited from SiliconStudio.Core.IComponent
long Id [get]
 Gets the id of this component. More...
 
string Name [get]
 Gets the name of this component. More...
 
- Properties inherited from SiliconStudio.Core.IReferencable
int ReferenceCount [get]
 Gets the reference count of this instance. More...
 
- Properties inherited from SiliconStudio.Core.ICollectorHolder
ObjectCollector Collector [get]
 Gets the collector. More...
 
- Properties inherited from SiliconStudio.Paradox.Games.IUpdateable
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...
 
- Properties inherited from SiliconStudio.Paradox.Games.IDrawable
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

- Public Attributes inherited from SiliconStudio.Core.ComponentBase
PropertyContainer Tags
 Gets the attached properties to this component. More...
 
- Protected Member Functions inherited from SiliconStudio.Paradox.Games.GameSystemBase
 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...
 
- Protected Member Functions inherited from SiliconStudio.Core.ComponentBase
 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...
 
- Events inherited from SiliconStudio.Paradox.Games.GameSystemBase
EventHandler< EventArgsDrawOrderChanged
 
EventHandler< EventArgsVisibleChanged
 
EventHandler< EventArgsEnabledChanged
 
EventHandler< EventArgsUpdateOrderChanged
 
- Events inherited from SiliconStudio.Paradox.Games.IUpdateable
EventHandler< EventArgsEnabledChanged
 Occurs when the Enabled property changes. More...
 
EventHandler< EventArgsUpdateOrderChanged
 Occurs when the UpdateOrder property changes. More...
 
- Events inherited from SiliconStudio.Paradox.Games.IDrawable
EventHandler< EventArgsDrawOrderChanged
 Occurs when the DrawOrder property changes. More...
 
EventHandler< EventArgsVisibleChanged
 Occurs when the Visible property changes. More...
 

Detailed Description

The script system handles scripts scheduling in a game.

Definition at line 16 of file ScriptSystem.cs.

Constructor & Destructor Documentation

SiliconStudio.Paradox.ScriptSystem.ScriptSystem ( IServiceRegistry  registry)

Initializes a new instance of the GameSystemBase class.

Parameters
registryThe registry.

The GameSystem is expecting the following services to be registered: IGame and AssetManager.

Definition at line 29 of file ScriptSystem.cs.

Member Function Documentation

MicroThread SiliconStudio.Paradox.ScriptSystem.Add ( Func< Task microThreadFunction)

Adds the specified micro thread function.

Parameters
microThreadFunctionThe micro thread function.
Returns
MicroThread.

Definition at line 56 of file ScriptSystem.cs.

MicroThread SiliconStudio.Paradox.ScriptSystem.Add ( IScript  script)

Adds the specified script.

Parameters
scriptThe script.
Returns
MicroThread.

Definition at line 66 of file ScriptSystem.cs.

ChannelMicroThreadAwaiter<int> SiliconStudio.Paradox.ScriptSystem.NextFrame ( )

Allows to wait for next frame.

Returns
ChannelMicroThreadAwaiter<System.Int32>.

Definition at line 46 of file ScriptSystem.cs.

override void SiliconStudio.Paradox.ScriptSystem.Update ( GameTime  gameTime)
virtual

This method is called when this game component is updated.

Parameters
gameTimeThe 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.

Parameters
microThreadsThe micro threads.
Returns
Task.

Definition at line 76 of file ScriptSystem.cs.

Property Documentation

Scheduler SiliconStudio.Paradox.ScriptSystem.Scheduler
getset

Gets the scheduler.

The scheduler.

Definition at line 22 of file ScriptSystem.cs.


The documentation for this class was generated from the following file: