public void Train(int attribute) { trainingNow = true; Inventory.sharedInstance.inventoryItems[attribute]--; Inventory.sharedInstance.SaveInventory(); monsterInTraining = tempChosenMonster; MonsterCollector.sharedInstance.PutInUnavailableList(monsterInTraining); trainingButton.transform.GetChild(1).GetComponent <Image>().sprite = rewardImages[attribute]; trainingButton.SetActive(true); trainingButton.GetComponent <TrainingRewardTimer>().StartTimer(); attributeToTrain = attribute; int value = Random.Range(minIncreaseValue, maxIncreaseValue); attributeIncrease = value; PlayerPrefs.SetInt("_training", 1); PlayerPrefs.SetInt("_trainingCategory", attributeToTrain); PlayerPrefs.SetInt("_attributeIncrease", attributeIncrease); PlayerPrefs.SetString("_monsterInTraining", monsterInTraining); monsterCollection.UpdateSpawnedMonsters(); monsterManagePanel.SetActive(false); monsterView.SetActive(false); }
public void StartBreeding() { PlayerPrefs.SetInt("_breeding", 1); breedingNow = true; foreach (Monster monster in monstersToBreed) { MonsterCollector.sharedInstance.PutInUnavailableList(monster.Name); } breedingButton.SetActive(true); breedingButton.GetComponent <BreedingRewardTimer>().StartTimer(); PlayerPrefs.SetString("_monsterFusing1", monsterName1); PlayerPrefs.SetString("_monsterFusing2", monsterName2); monsterCollection.UpdateSpawnedMonsters(); monsterManageScreen.SetActive(false); breedMonsterPanel.SetActive(false); }