public static TileMeshGenerator GetInstance() { if (instance == null) { instance = new TileMeshGenerator(); } return(instance); }
/// <summary> /// Upon loading up the map data and the necessary /// </summary> /// <param name="type"></param> /// <param name="obj"></param> private void OnLoadCompleteEvent(EventTypeEnum type, object obj) { EventController.GetInstance().UnregisterForEvent( EventTypeEnum.AssetsLoadMultipleComplete, OnLoadCompleteEvent); Debug.Log("Map Assets Done!"); // Generate the tile mesh mapMesh = TileMeshGenerator.GetInstance().GenerateMesh(currentMap); //gridOverlay = GridOverlayGenerator.GetInstance().GenerateMesh(currentMap); occupiedTileMap = new int[currentMap.GetWidth(), currentMap.GetHeight()]; //pathingController.search.GenerateMapGraph(currentMap); // Hide it by default mapMesh.SetActive(false); }