Beispiel #1
0
 public void LoadMap(MapInfo mapInfo, Action <bool> isSuccess)
 {
     _couroutineStarter.StartCoroutine(LoadMapFromPackageFileAsync(mapInfo, b =>
     {
         Logger.LogText("______ MAP LOADED");
         isSuccess(b);
     }));
 }
Beispiel #2
0
        public void LoadMap(MapInfo mapInfo, Action <bool> isSuccess)
        {
            _couroutineStarter.StartCoroutine(LoadMapFromPackageFileAsync(mapInfo, b =>
            {
                Logger.LogText("______ MAP LOADED");
                _mapInfo     = mapInfo;
                _mapFileName = Path.GetFileNameWithoutExtension(mapInfo.FilePath);
                isSuccess(b);

                if (Events.OnMapChange != null)
                {
                    try
                    {
                        Events.OnMapChange(true);
                    }
                    catch (Exception e)
                    {
                        Debug.LogError(e);
                    }
                }
            }));
        }