Exemple #1
0
    public static PetData A_LoadPet(int id)
    {
        PetData petData = new PetData();
        Player  player  = Loaded();

        for (int i = 0; i < player.pets.Count; i++)
        {
            if (player.pets[i].id == id)
            {
                petData.CloneData(player.pets[i]);
                return(petData);
            }
        }
        Debug.LogError("Not found a pet");
        return(null);
    }
Exemple #2
0
    public void CallbackDelete(bool bo)
    {
        if (!bo)
        {
            return;
        }
        Player p = SaveSystem.A_LoadSaveGame();

        for (int i = 0; i < p.pets.Count; i++)
        {
            if (petID == p.pets[i].id)
            {
                p.pets[i].status = -1;
                PetData petData = new PetData();
                petData.CloneData(p.pets[i]);
                SaveSystem.A_EditPet(petData, true, LoadItem);
                popupEdit.SetActive(false);
            }
        }
    }