Ejemplo n.º 1
0
    public static void SaveAllInfo()
    {
        PlayerPrefs.SetString("PLAYERNAME", GameInfo.PlayerName);
        PlayerPrefs.SetInt("PLAYERLEVEL", GameInfo.PlayerLevel);

        PlayerPrefs.SetInt("STRENGHT", GameInfo.Strength);
        PlayerPrefs.SetInt("INTELECT", GameInfo.Intelect);
        PlayerPrefs.SetInt("AGILITY", GameInfo.Agility);
        PlayerPrefs.SetInt("LUCK", GameInfo.Luck);
        PlayerPrefs.SetInt("HITPOINT", GameInfo.Hitpoint);

        SafeInfo.SaveAllInfo();
    }
Ejemplo n.º 2
0
    public void CreateNewPlayer()
    {
        newPlayer.PlayerLevel = 1;
        newPlayer.PlayerName  = playerName;

        GameInfo.PlayerLevel = newPlayer.PlayerLevel;
        GameInfo.PlayerName  = newPlayer.PlayerName;
        GameInfo.PlayerClass = newPlayer.PlayerClass;

        GameInfo.Strength = newPlayer.Strength;
        GameInfo.Intelect = newPlayer.Intelect;
        GameInfo.Agility  = newPlayer.Agility;
        GameInfo.Stamina  = newPlayer.Stamina;
        GameInfo.Luck     = newPlayer.Luck;
        GameInfo.Hitpoint = newPlayer.Hitpoint;

        SafeInfo.SaveAllInfo();
        SceneManager.LoadScene("Startmenue");
    }