Ejemplo n.º 1
0
 //returns the tile a checkpoint is in
 public static Tile inTile(Level l, Checkpoint c)
 {
     foreach (Tile t in l.theLevel){
             if (t.rect.Contains(c.getPoint())){
              return t;
             }
     }
     return new Tile();
 }
Ejemplo n.º 2
0
 //returns true if the checkpoint's in a solid tile
 public static bool isColliding(Level l, Checkpoint c)
 {
     foreach (Tile t in l.theLevel)
     {
         if (t.rect.Contains(c.getPoint()) && t.isSolid)
         {
             return true;
         }
     }
     return false;
 }