By default events raised on the ECS event bus are now dispatched immediately. (#794)

Added a new EntityManager.QueueEvent() method that queues the event for the next tick.
This commit is contained in:
Acruid
2019-04-20 01:58:04 -07:00
committed by Pieter-Jan Briers
parent 55fb70af8b
commit faf99d2231
3 changed files with 11 additions and 0 deletions

View File

@@ -334,6 +334,11 @@ namespace Robust.Shared.GameObjects
}
public void RaiseEvent(object sender, EntityEventArgs toRaise)
{
ProcessSingleEvent(new Tuple<object, EntityEventArgs>(sender, toRaise));
}
public void QueueEvent(object sender, EntityEventArgs toRaise)
{
_eventQueue.Enqueue(new Tuple<object, EntityEventArgs>(sender, toRaise));
}