2D-Platformer/Assets/Scripts/Systems/EventRemovalSystem.cs
2022-02-12 12:53:50 +02:00

21 lines
No EOL
399 B
C#

using Events;
using Unity.Entities;
namespace DefaultNamespace
{
[UpdateInGroup(typeof(SimulationSystemGroup))]
public class EventRemovalSystem : ComponentSystem
{
private EntityQuery group;
protected override void OnCreate()
{
group = GetEntityQuery(ComponentType.ReadOnly<EventData>());
}
protected override void OnUpdate()
{
EntityManager.DestroyEntity(group);
}
}
}