public void CheckForAction(IInputContext inputContext) { Point grabTilePoint = inputContext.GetGrabTIlePoint(); // Prevent running the action if the player is too far. if (!Utility.tileWithinRadiusOfPlayer(grabTilePoint.X, grabTilePoint.Y, 1, Game1.player)) { return; } Tile selectedTile = GetTileAtPoint(grabTilePoint); if (selectedTile != null) { RunTileProperties(selectedTile); } }