Exemple #1
0
    public void VerifyMainSaveFile()
    {
        OnSaveFileAccessed();

        if (ES3.FileExists("main.es3"))
        {
            Debug.Log("Main save data exists.");
        }
        else
        {
            Debug.Log("Main save data does not exist.");
        }

        if (ES3.KeyExists("mostRecentStartup", "main.es3"))
        {
            Debug.Log("Welcome back! Last play session was " + ES3.Load <System.DateTime>("mostRecentStartup", "main.es3"));
        }

        ES3.Save <System.DateTime>("mostRecentStartup", System.DateTime.Now, "main.es3");

        if (ES3.DirectoryExists(saveFilesDirectory))
        {
            foreach (var filename in ES3.GetFiles(saveFilesDirectory))
            {
                Debug.Log("Found save file: " + filename);
            }
        }
        else
        {
            Debug.Log("No save files exist.");
        }
    }
Exemple #2
0
        public override void Enter()
        {
            exists.Value = ES3.DirectoryExists(directoryPath.Value, GetSettings());

            if (exists.Value && existsEvent != null)
            {
                Fsm.Event(existsEvent);
            }
            else if (doesNotExistEvent != null)
            {
                Fsm.Event(doesNotExistEvent);
            }
        }
Exemple #3
0
        public override void Enter()
        {
            exists.Value = ES3.DirectoryExists(directoryPath.Value, GetSettings());

            Fsm.Event(exists.Value ? existsEvent : doesNotExistEvent);
        }