4 using System.Threading.Tasks;
6 using SiliconStudio.Core;
7 using SiliconStudio.Core.Serialization.Assets;
8 using SiliconStudio.Paradox.Games;
9 using SiliconStudio.Core.MicroThreading;
48 return Scheduler.NextFrame();
58 return Scheduler.Add(microThreadFunction);
68 return Scheduler.Add(script.Execute);
78 await Scheduler.WhenAll(microThreads);
Represents an execution context managed by a Scheduler, that can cooperatively yield execution to ano...
A service registry is a IServiceProvider that provides methods to register and unregister services...
The script system handles scripts scheduling in a game.
Base class for a GameSystemBase component.
async Task WhenAll(params MicroThread[] microThreads)
Waits all micro thread finished their task completion.
Current timing used for variable-step (real time) or fixed-step (game time) games.
MicroThread Add(IScript script)
Adds the specified script.
MicroThread Add(Func< Task > microThreadFunction)
Adds the specified micro thread function.
ChannelMicroThreadAwaiter< int > NextFrame()
Allows to wait for next frame.
override void Update(GameTime gameTime)
This method is called when this game component is updated.
Scheduler that manage a group of cooperating MicroThread.
ScriptSystem(IServiceRegistry registry)
Initializes a new instance of the GameSystemBase class.