Exemplo n.º 1
0
	// ---------------------------------------------------
	/**
	 * Static initialitzation of pathfinding, but also it can be called externally to adjust 
	 * to new parameters
	 */
	public static PathFinding InitPathfinding(int rows, int cols, 
	                                          float xIni, float zIni, 
	                                          float cellWidth, float cellHeight) 
	{
		int[] matrix = new int[rows * cols];
		Global.MakeMatrix(false, matrix, xIni, zIni, cellWidth, cellHeight, rows, cols);

		// PATHFINDING
		PathFinding path = new PathFinding(rows, cols, cellWidth, cellHeight, xIni, zIni);
		path.InitAI(matrix);
		return (path);
	}