Exemplo n.º 1
0
        public override bool Test(CollisionEntity entity)
        {
            bool result = false;

            if (entity is CollisionBox)
            {
                result = boundingBox.Intersects((entity as CollisionBox).boundingBox);
            }
            else if (entity is CollisionSphere)
            {
                result = boundingBox.Intersects((entity as CollisionSphere).boundingSphere);
            }

            return(result);
        }
Exemplo n.º 2
0
 // Stop tracking an entity
 public void DeregisterEntity(CollisionEntity entity)
 {
     entity.DeregisterEntity();
 }
Exemplo n.º 3
0
 // Add a new entity to track
 public void RegisterEntity(CollisionEntity entity)
 {
     entity.RegisterEntity(entities);
 }
Exemplo n.º 4
0
 // Test collision with another entity
 public abstract bool Test(CollisionEntity entity);