Files
RobustToolbox/Robust.Shared/Interfaces/GameObjects/Systems/IEntitySystem.cs
T
AcruidandGitHub 728f58465d EntitySystem Event Refactor (#989)
* Removed the EntitySystem event implementation, it now uses the more advanced EventBus.
Removed EntitySystem.RegisterMessageTypes() function.
Removed EntitySystem.SubscribeEvents() function.
Added EntitySystemMessage.NetChannel field. This holds the remote net channel the event originated from.

* Removed the Sender object from events. If you needed this field, add it to the event class.

* Removed unused event proxy methods from Entity.
SubscribeEvent() has been split into SubscribeNetworkEvent() and SubscribeLocalEvent() methods on EntitySystem.
Most methods on EntityEventBus now require callers to specify the source (Local or Network) of the events.
2020-02-22 17:59:43 +01:00

31 lines
1.1 KiB
C#

using Robust.Shared.GameObjects;
namespace Robust.Shared.Interfaces.GameObjects.Systems
{
/// <summary>
/// A subsystem that acts on all components of a type at once.
/// Entity systems are similar to TGstation13 subsystems.
/// They have a set of entities to run over and run every once in a while.
/// They get managed by an <see cref="IEntitySystemManager" />.
/// </summary>
public interface IEntitySystem : IEntityEventSubscriber
{
/// <summary>
/// Called once when the system is created to initialize its state.
/// </summary>
void Initialize();
/// <summary>
/// Called once before the system is destroyed so that the system can clean up.
/// </summary>
void Shutdown();
/// <summary>
/// Called once per frame/tick to update the system.
/// </summary>
/// <param name="frameTime">Delta time since Update() was last called.</param>
void Update(float frameTime);
void FrameUpdate(float frameTime);
}
}