Example #1
0
    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;
    }
Example #2
0
    public void Created(SeedBase seedToEquip)
    {
        berrySprite   = seedToEquip.GetBerrySprite();
        infoName.text = seedToEquip.GetBerryName();

        growthMultiplier = seedToEquip.GetGrowthMultiplier();
        //playerValues.seedStage = 0;
        hasEquippedSeed = true;
        OnEnable();
    }
Example #3
0
    public void Created()
    {
        if (created)
        {
            return;
        }

        if (GetComponentInChildren <SeedBase>() != null)
        {
            SeedBase seed = GetComponentInChildren <SeedBase>();

            seedName    = seed.GetSeedName();
            berryName   = seed.GetBerryName();
            seedText    = seed.GetInfo();
            seedSprite  = seed.GetSeedSprite();
            berrySprite = seed.GetBerrySprite();
            timeText    = seed.GetGrowthTimeString();
            clockSprite = clock;

            created = true;
        }
    }