//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(); }
//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; }