Esempio n. 1
0
 /// <summary>
 /// Saves a specific game data.
 /// </summary>
 public static void SaveData(SaveItems keyName, int keyValue)
 {
     PlayerPrefs.SetInt(keyName.ToString(), keyValue);
     PlayerPrefs.Save();
 }
Esempio n. 2
0
    public static int selectedCharacterIndex = 0;                               //!< Index of the character to spawn.

    /// <summary>
    /// Gets the saved amount of a specific attribute.
    /// </summary>
    public static int GetSavedAttribute(SaveItems itemName)
    {
        return(PlayerPrefs.GetInt(itemName.ToString()));
    }