public void makePath(double x, double y, List<Point2D> path,
			MatrixGraph graph) {
		path.clear();
		int xI = GameConfig.pixelToTile(getPosition().getX());
		int yI = GameConfig.pixelToTile(getPosition().getY());
		if (PathManager.getPathManager().hasPath(xI, yI)) {
			path.addAll(PathManager.getPathManager().getPath(xI, yI));
			return;
		}

		AStar aStar = new AStar(graph);

		List<Node> nodePath = aStar.search(xI, yI, GameConfig.pixelToTile(x),
				GameConfig.pixelToTile(y), true);

		nodePath.remove(0);
		for (Node node : nodePath)
			path.add(new Point2D.Double(GameConfig.tileToPixel(node.getX()),
					GameConfig.tileToPixel(node.getY())));

		path.add(new Point2D.Double(x, y));

		PathManager.getPathManager().addPath(xI, yI, path);
	}