示例#1
0
    private IEnumerator MapCreation(MapDisplayScript.MapCreationFinished interfaceEnablingAction)
    {
        yield return(CreateObstacleList());

        yield return(CreateMapTiles(obstacleList));

        interfaceEnablingAction.Invoke();
    }
示例#2
0
    public void DisplayMap(char[,] map, MapDisplayScript.MapCreationFinished interfaceEnablingAction)
    {
        if (rectTransform == null)
        {
            rectTransform = GetComponent <RectTransform>();
        }

        currentlyDisplayedMap  = (map == null)? currentlyDisplayedMap : map;
        currentlyDisplayedPath = null;

        SetTileSize();

        /*
         * TileBuildHelper[] obstacleList = CreateObstacleList();
         * CreateMapTiles(obstacleList);
         */

        StartCoroutine(MapCreation(interfaceEnablingAction));
    }