public void PlantBerry(SeedBase berry) //Stage 1 { berryPlantedAtTime = timeManager.GetTimeSeconds(); berryIsPlanted = true; berryGrowthPoints = 0; berryStage = 1; plantSprite.sprite = plantStageOne; plantedBerry = berry; plantedBerryName = berry.GetSeedName(); berryGrowthSpeed = berry.GetGrowthMultiplier(); plantStageFive = berry.GetBerryTileFinishedSprite(); berry.SetInactiveStatus(true); }
private void HarvestBerry() { berryIsPlanted = false; berryPlantedAtTime = 0; plantSprite.sprite = plantStageZero; plantedBerryName = ""; plantedBerry.SetBerryStatus(true); plantedBerry.SetInactiveStatus(false); string itemIntro = "You picked up a"; string itemText = plantedBerry.GetBerryName(); GameObject popup = Instantiate(rewardbox, FindObjectOfType <RewardboxParent>().transform); popup.GetComponent <Rewardbox>().AssignInfo(itemIntro, itemText, plantedBerry.GetBerrySprite()); popup.GetComponent <Rewardbox>().SetRewardTextColor(new Color(63f / 255f, 202f / 255f, 184f / 255f)); plantedBerry = null; }