public void OnAttach(Entity entity) { if (entity.HasBehavior(typeof(CollisionBehavior))) { collidables.Add(entity); } }
private void removeEntity(Entity entity) { if (entity.HasBehavior(typeof(DyingBehavior))) { entity.State = EntityState.Dying; entityDyingQueue.Add(entity); } else { entity.State = EntityState.Dead; entityRemoveQueues[activeRemoveQueue].Add(entity); } }