Example #1
0
 public static void ConventionalTest()
 {
     foreach (var s in ShapeSystem.shapes)
     {
         foreach (var other in ShapeSystem.shapes)
         {
             if (s != other && Collision.IsColliding(s, other))
             {
                 ShapeSystem.OnCollisionEnter(s, other);
             }
         }
     }
 }
Example #2
0
 public void Search(Shape s)
 {
     if (!Collision.IsColliding(s, boundry))
     {
         return;
     }
     for (int i = 0; i < shapesCounter; i++)
     {
         if (s != shapes[i] && Collision.IsColliding(s, shapes[i]))
         {
             ShapeSystem.OnCollisionEnter(s, shapes[i]);
         }
     }
     if (subdivided)
     {
         tl.Search(s);
         tr.Search(s);
         bl.Search(s);
         br.Search(s);
     }
 }