Ejemplo n.º 1
0
    //allow for all player information to be saved
    public static void SaveAllInformation()
    {
        PlayerPrefs.SetInt("PLAYERLEVEL", GameInformation.PlayerLevel);
        PlayerPrefs.SetString("PLAYERNAME", GameInformation.PlayerName);
        PlayerPrefs.SetInt("STAMINA", GameInformation.Stamina);
        PlayerPrefs.SetInt("STRENGTH", GameInformation.Strength);
        PlayerPrefs.SetInt("INTELLECT", GameInformation.Intellect);
        PlayerPrefs.SetInt("ENDURANCE", GameInformation.Endurance);
        PlayerPrefs.SetInt("DEXTERITY", GameInformation.Dexterity);

        if (GameInformation.EquipmentOne != null)
        {
            PlayerPrefSerialization.Save("EQUIPMENTITEM1", GameInformation.EquipmentOne);
        }
        //for testing
        Debug.Log("SAVED ALL PLAYER INFORMATION");
    }
Ejemplo n.º 2
0
    // break into smaller funcs
    public static void SaveAllInformation()
    {
        PlayerPrefs.SetString("PLAYERNAME", GameInformation.PlayerName);
        PlayerPrefSerialization.Save("PLAYERCLASS", GameInformation.PlayerClass);
        PlayerPrefs.SetInt("PLAYERCPU", GameInformation.PlayerCPU);

        PlayerPrefs.SetInt("CREDITS", GameInformation.Credits);

        PlayerPrefs.SetInt("PLAYERRAM", GameInformation.RAM);

        PlayerPrefs.SetInt("PLAYERSTRENGTH", GameInformation.Strength);
        PlayerPrefs.SetInt("PLAYERDEXTERITY", GameInformation.Dexterity);
        PlayerPrefs.SetInt("PLAYERINTELLECT", GameInformation.Intellect);

        SaveCurrentlyEquiped();

        Debug.Log("Saved information");
    }
Ejemplo n.º 3
0
    static public void SaveCurrentlyEquiped()
    {
        // Save Defensive Hardware
        // Shell
        if (GameInformation.EquipedShell != null)
        {
            PlayerPrefSerialization.Save("SHELL", GameInformation.EquipedShell);
        }
        // Processor
        if (GameInformation.EquipedProcessor != null)
        {
            PlayerPrefSerialization.Save("PROCESSOR", GameInformation.EquipedProcessor);
        }
        // Expansion 1
        if (GameInformation.EquipedExpansion1 != null)
        {
            PlayerPrefSerialization.Save("EXPANSION1", GameInformation.EquipedExpansion1);
        }
        // Expansion 2
        if (GameInformation.EquipedExpansion2 != null)
        {
            PlayerPrefSerialization.Save("EXPANSION2", GameInformation.EquipedExpansion2);
        }
        // Coroutine
        if (GameInformation.EquipedCoroutine != null)
        {
            PlayerPrefSerialization.Save("COROUTINE", GameInformation.EquipedCoroutine);
        }

        // Save Offensive Hardware
        // Main hand
        if (GameInformation.EquipedMainHand != null)
        {
            PlayerPrefSerialization.Save("MAINHAND", GameInformation.EquipedMainHand);
        }
        // Off hand
        if (GameInformation.EquipedOffHand != null)
        {
            PlayerPrefSerialization.Save("OFFHAND", GameInformation.EquipedOffHand);
        }
    }