MoonTools.ECS/src/System.cs

16 lines
503 B
C#
Raw Normal View History

2022-04-08 05:52:03 +00:00
using System;
2022-03-05 02:01:44 +00:00
2023-11-03 19:40:26 +00:00
namespace MoonTools.ECS;
2022-03-07 07:17:05 +00:00
2023-11-03 19:40:26 +00:00
public abstract class System : Manipulator
{
protected System(World world) : base(world) { }
2022-03-07 18:56:53 +00:00
2023-11-03 19:40:26 +00:00
public abstract void Update();
2023-11-03 19:40:26 +00:00
protected ReadOnlySpan<T> ReadMessages<T>() where T : unmanaged => World.ReadMessages<T>();
protected T ReadMessage<T>() where T : unmanaged => World.ReadMessage<T>();
protected bool SomeMessage<T>() where T : unmanaged => World.SomeMessage<T>();
protected void Send<T>(T message) where T : unmanaged => World.Send(message);
2022-03-05 02:01:44 +00:00
}