示例#1
0
    public static SavedMap GetMap(string worldName, int level)
    {
        TextAsset binFile = getAssetBundle().LoadAsset(worldName + sepertor + level + fileSufix) as TextAsset;
        MapSaver  saver   = new MapSaver(binFile);

        return(saver.GetMap());
    }
示例#2
0
        public void SetupWithEditorMap(string newMapName)
        {
            MapSaver mapSaver = new MapSaver();

            mapSaver.LoadMap(newMapName, true);
            SetupSceneMap(mapSaver.GetMap());
        }
示例#3
0
    /// <summary>
    /// Load a map from the RefManager
    /// </summary>
    /// <returns>return true if the function loaded map otherwise false</returns>
    private bool loadMap()
    {
        if (RefManager.Instance.mapEditorName.Length == 0)
        {
            return(false);
        }
        MapSaver mapSaver = new MapSaver(RefManager.Instance.mapEditorName, true);

        ConvertMapToGrid(mapSaver.GetMap());
        return(true);
    }