Exemplo n.º 1
0
    public void loadPlayer()
    {
        PlayerData data = SavingScript.loadPlayer();

        _currentBench = data.Currentbench;
        _currentScene = data.CurrentScene;
    }
Exemplo n.º 2
0
        /// <summary>
        /// Saves a <see cref="Script"/>
        /// </summary>
        /// <param name="script"><see cref="Script"/> to save</param>
        /// <param name="userId"></param>
        public void SaveScript(Script script, int userId = 0)
        {
            if (SavingScript.IsRaisedEventCancelled(new SaveEventArgs<Script>(script), this))
                return;

            var uow = _fileUowProvider.GetUnitOfWork();
            using (var repository = _repositoryFactory.CreateScriptRepository(uow))
            {
                repository.AddOrUpdate(script);
                uow.Commit();

                SavedScript.RaiseEvent(new SaveEventArgs<Script>(script, false), this);
            }

            Audit(AuditType.Save, string.Format("Save Script performed by user"), userId, -1);
        }
Exemplo n.º 3
0
    public void LoadProgress()
    {
        string path = Application.persistentDataPath + "/player.dont";

        if (File.Exists(path))
        {
            PlayerData data = SavingScript.LoadProgress();
            distanceBuffer       = data.distance;
            subsBuffer           = data.subs;
            twoMilionAwardBuffer = data.twoMilionAward;
            waveBuffer           = data.wave;
            levelBuffer          = data.level;
            showAwardBuffer      = data.showAward;
        }
        else
        {
            SaveProgress();
        }


        ProgressUpdate();
    }
Exemplo n.º 4
0
 public void createSave()
 {
     _currentScene = 3;
     _currentBench = 1;
     SavingScript.savePlayer(this);
 }
Exemplo n.º 5
0
 public void savePlayer()
 {
     Debug.Log("saving");
     SavingScript.savePlayer(this);
 }
Exemplo n.º 6
0
 public void SaveProgress()
 {
     SavingScript.SaveProgress(this);
 }