18 lines
454 B
C#
18 lines
454 B
C#
|
|
namespace OECS;
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// A system that runs on every tick.
|
||
|
|
/// Systems declare a query and receive the world in their <see cref="Run"/> method.
|
||
|
|
/// </summary>
|
||
|
|
public interface ISystem
|
||
|
|
{
|
||
|
|
/// <summary>
|
||
|
|
/// The query that defines which entities this system operates on.
|
||
|
|
/// </summary>
|
||
|
|
QueryDescriptor Query { get; }
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// Executes the system logic for this tick.
|
||
|
|
/// </summary>
|
||
|
|
void Run(World world);
|
||
|
|
}
|