Example #1
0
    public static string [] GetLevelsList()
    {
        string [] levelsFullPathes = STFileMng.GetFilesList();
        string [] levelsArray      = new string  [levelsFullPathes.Length];

        for (int i = 0; i < levelsFullPathes.Length; i++)
        {
            levelsArray[i] = Path.GetFileNameWithoutExtension(levelsFullPathes[i]);
        }

        return(levelsArray);
    }
Example #2
0
    public static void LoadLevel(string fileName)
    {
        sLevel = new STSerializedLevel();
        //STSerializedLevel data;

        if (STFileMng.LoadData(fileName, sLevelSerializer, out sLevel))
        {
            clearLevel();

            _instance.NodesNet.LoadNet(sLevel.net);
            _instance.RootNode.LoadNodes(sLevel.rootNode);
        }
        else
        {
        }
    }
Example #3
0
 public static void DeleteLevel(string fileName)
 {
     STFileMng.DeleteData(fileName);
 }
Example #4
0
    public static bool SaveLevel(string fileName, bool shouldRewrite)
    {
        sLevel = STLevel.Instance().GetSerializedLevel();

        return(STFileMng.SaveData(sLevel, sLevelSerializer, fileName, shouldRewrite));
    }