public void OnAttach(Entity entity)
 {
     if (entity.HasBehavior(typeof(CollisionBehavior)))
     {
         collidables.Add(entity);
     }
 }
Esempio n. 2
0
 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);
     }
 }