private IEnumerator MapCreation(MapDisplayScript.MapCreationFinished interfaceEnablingAction) { yield return(CreateObstacleList()); yield return(CreateMapTiles(obstacleList)); interfaceEnablingAction.Invoke(); }
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)); }