@Override
    public void mouseDragged(MouseEvent e)
    {
        mX = e.getX();
        mY = e.getY();
        
        if(canPath)
        {
            if(found) //After all possible movement paths have been found, it can start finding walk path
            {
                //sets added to false if current tile changes, floor and cast to properly handle negatives
                added = (int) Math.floor((mX - Game.MAPOFFX) / (double) Game.TILESIZE) + Game.xOff == cX && (int) Math.floor((mY - Game.MAPOFFY) / (double) Game.TILESIZE) + Game.yOff == cY;
                
                if(!added) //If moved to new tile, find walk path to new tile
                {
                    cX = (int) Math.floor((mX - Game.MAPOFFX) / (double) Game.TILESIZE) + Game.xOff;
                    cY = (int) Math.floor((mY - Game.MAPOFFY) / (double) Game.TILESIZE) + Game.yOff;
                    added = Game.paths.addPath(cX, cY);
                }
                //System.out.println(cX + " & " + cY);
            }
            else
            {  
                selected = Game.map.getUnit(pX, pY);
                if(Game.gui.canSelect(selected))
                {
                    //Find Paths
                    Game.gui.update(selected);
                    Game.paths.findPath(selected.pathInfo());
                    //Game.paths.printPaths();
                    found = true;
                }
            }
        }
        Game.gui.update(mX, mY);
    }