Exemplo n.º 1
0
    void Awake()
    {
        //Set the default file
        PlayerSave.SetSaveFile(defaultSave);

        //Set the loaded methods
        _loadedSave  = PlayerSave.GetSaveFile();
        _loadedCrypt = PlayerSave.GetEncryptionMethod();

        //Load the default save
        PlayerSave.Load();
    }
Exemplo n.º 2
0
    void OnDisable()
    {
        //We have to make sure the data isn't kept in the editor as it gets really confusing.
        if (!Application.isPlaying)
        {
            PlayerSave.DeleteAll();
            return;
        }

        //Pull out the settings and save the information before we loose it all during Serialization.
        _loadedCrypt = PlayerSave.GetEncryptionMethod();
        _loadedSave  = PlayerSave.GetSaveFile();
        PlayerSave.Save();
    }
Exemplo n.º 3
0
 /// <summary>
 /// Sets the current encryption method
 /// </summary>
 /// <param name="method">The encryption to set too.</param>
 public static void SetEncryptionMethod(SaveEncryptionMethod method)
 {
     ecnryptMethod = method;
 }