/// <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> public UpdateSystem(Scene scene, uint tasks) : base(scene) { updateSystemHandler = new UpdateSystemHandler(this, UpdateEntity) { TotalTasks = tasks }; }
/// <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> public UpdateSystem(Scene scene, uint tasks, int targetFPS) : base(scene) { updateSystemHandler = new UpdateSystemHandler(this, UpdateEntity) { TotalTasks = tasks, TargetFPS = targetFPS }; }
/// <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); }
/// <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="factory">The factory this system will exist in.</param> public UpdateSystem(MorroFactory factory) : base(factory) { updateSystemHandler = new UpdateSystemHandler(this, UpdateEntity); }
/// <summary> /// Create a <see cref="MorroSystem"/> that combines the functionality of an <see cref="UpdateSystem"/> and a <see cref="DrawSystem"/>. /// </summary> /// <param name="factory">The factory this system will exist in.</param> public HybridSystem(MorroFactory factory) : base(factory) { updateSystemHandler = new UpdateSystemHandler(this, UpdateEntity); drawSystemHandler = new DrawSystemHandler(this, DrawEntity); }