Ejemplo n.º 1
0
    // Performs A* Algorithm
    public void RunAStar()
    {
        int startX = _startX / nodeSizeX;
        int startY = _startY / nodeSizeY;
        int endX   = _endX / nodeSizeX;
        int endY   = _endY / nodeSizeY;

        Clear();

        // A*
        tileAStar.LoadFromTileMap(_controller.tileMap, nodeSizeX, nodeSizeY);
        tileAStar.RunAStar(startX, startY, endX, endY, heuristicType, heuristicWeight);

        // Render
        _renderer.Render(startX, startY, endX, endY);
    }