Exemplo n.º 1
0
        public void LoadGameData()
        {
#if UNITY_WEBPLAYER
            return;
#endif

            string path = pathForDocumentsFile(fileName);

            Debug.Log("try to load " + path);

            //if the file has not been made yet then set defaults and create it...
            if (!File.Exists(path))
            {
                Debug.Log("failed to load - Create GameSave File " + fileName);

                this.SetGameDataDefaults();
                FileStream newFile = new FileStream(path, FileMode.Create, FileAccess.Write);
                this.WriteGameDataToFile(newFile);
                newFile.Close();

                return;
            }

            //Otherwise just read it

            Ross_Utils.Log("Read GameSave File " + fileName);

            FileStream file = new FileStream(path, FileMode.Open, FileAccess.Read);
            this.ReadGameDataFromFile(file);
            file.Close();
        }
Exemplo n.º 2
0
        public void SaveGameData()
        {
                #if UNITY_WEBPLAYER
            return;
                #endif

            if (logOn)
            {
                Ross_Utils.Log("Write to GameSave File " + fileName);
            }

            string     path = this.pathForDocumentsFile(fileName);
            FileStream file = new FileStream(path, FileMode.Open, FileAccess.Write);
            this.WriteGameDataToFile(file);
            file.Close();
        }
Exemplo n.º 3
0
    //-----------------------------------------------------------------------------
    public void StartThrob()
    {
        Ross_Utils.Log("Throb: Start Throb 0");

        this.StartThrobMultiple(1);
    }