Initial Commit
This commit is contained in:
commit
ee5c2f922d
2255 changed files with 547750 additions and 0 deletions
21
Assets/Scripts/Systems/EventRemovalSystem.cs
Normal file
21
Assets/Scripts/Systems/EventRemovalSystem.cs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue