{ int x = unit.X - myGameInfo.Player.X; int y = unit.Y - myGameInfo.Player.Y; if (y + 10 < 0 || y + 10 >= Game.ScreenClicks.AxisY_X.Length) return false; double StartX = Game.ScreenClicks.AxisY_X[10 + y], StartY = Game.ScreenClicks.AxisY_Y[10 + y]; double offsetX = 27.38, offsetY = 14.5; int FinalX = (int)(StartX + x * offsetX), FinalY = (int)(StartY + x * offsetY); if (Game.ScreenClicks.isOutsideWindow(FinalX, FinalY)) return false; return true; }