Пример #1
0
 public override bool Collides(CompoundCollider compound, ref Collision collisionInfo)
 {
     if (BoundingCollider.Collides(compound.BoundingCollider, ref collisionInfo))
     {
         for (int i = 0; i < colliders.Count; i++)
         {
             for (int j = 0; j < compound.colliders.Count; j++)
             {
                 if (colliders[i].Collides(compound.colliders[j], ref collisionInfo))
                 {
                     return(true);
                 }
             }
         }
     }
     return(false);
 }
Пример #2
0
 public abstract bool Collides(CompoundCollider compound, ref Collision collisionInfo);
Пример #3
0
 //Circle vs Compound
 public override bool Collides(CompoundCollider compound, ref Collision collisionInfo)
 {
     return(compound.Collides(this, ref collisionInfo));
 }