Example #1
0
 /// <summary>
 /// Create a <see cref="MorroSystem"/> that will process or manipulate <see cref="IComponent"/> data on every frame or a fixed basis.
 /// </summary>
 /// <param name="scene">The scene this system will exist in.</param>
 /// <param name="tasks">The total amount of tasks to divide the update cycle into. Assigning more than one task allows entities to be updated asynchronously.</param>
 internal UpdateSystem(Scene scene, uint tasks) : base(scene)
 {
     updateSystemHandler = new UpdateSystemHandler(this, UpdateEntity)
     {
         TotalTasks = tasks
     };
 }
Example #2
0
 /// <summary>
 /// Create a <see cref="MorroSystem"/> that will process or manipulate <see cref="IComponent"/> data on every frame or a fixed basis.
 /// </summary>
 /// <param name="scene">The scene this system will exist in.</param>
 /// <param name="tasks">The total amount of tasks to divide the update cycle into. Assigning more than one task allows entities to be updated asynchronously.</param>
 /// <param name="targetFPS">The target framerate the system will update in.</param>
 internal UpdateSystem(Scene scene, uint tasks, int targetFPS) : base(scene)
 {
     updateSystemHandler = new UpdateSystemHandler(this, UpdateEntity)
     {
         TotalTasks = tasks,
         TargetFPS  = targetFPS
     };
 }
Example #3
0
        /// <summary>
        /// Create a <see cref="MorroSystem"/> that combines the functionality of an <see cref="UpdateSystem"/> and a <see cref="DrawSystem"/>.
        /// </summary>
        /// <param name="scene">The scene this system will exist in.</param>
        /// <param name="tasks">The total amount of tasks to divide the update cycle into. Assigning more than one task allows entities to be updated asynchronously.</param>
        internal HybridSystem(Scene scene, uint tasks) : base(scene)
        {
            updateSystemHandler = new UpdateSystemHandler(this, UpdateEntity)
            {
                TotalTasks = tasks,
            };

            drawSystemHandler = new DrawSystemHandler(this, DrawEntity);
        }