Exemplo n.º 1
0
    Level()
    {
        CurrentLevel = this;

#if UNITY_EDITOR
        SceneListReader.Initialise();
#endif
    }
Exemplo n.º 2
0
    void Awake()
    {
        SceneListReader.Initialise();

        Level.HighestLevel = PlayerPrefs.GetInt("Highest Level", SceneListReader.FirstLevel);

        LastLevel = PlayerPrefs.GetInt("Last Played Level", -1);
    }
Exemplo n.º 3
0
    SceneListSaver()
    {
        SceneListReader.Initialise();

        FirstLevel = SceneListReader.FirstLevel;
        LastLevel  = SceneListReader.LastLevel;

        UpdateSceneList();

        Repaint();
    }
Exemplo n.º 4
0
        public static string[] OnWillSaveAssets(string[] AssetFiles)
        {
            SceneListReader.Initialise();

            CheckLevelValues();

            if (!SaveList || ActiveSceneList.Length == 0)
            {
                return(AssetFiles);
            }

            string ResourcesFolder = Application.dataPath + "/Resources/";

            if (!System.IO.Directory.Exists(ResourcesFolder))
            {
                System.IO.Directory.CreateDirectory(ResourcesFolder);
            }

            System.IO.File.WriteAllText(ResourcesFolder + "Level List.bytes", ActiveSceneList.Length + "\n" + FirstLevel + "\n" + LastLevel + "\n" + string.Join("\n", ActiveSceneList));

            return(AssetFiles);
        }