예제 #1
0
 public void InitializeFeeder(GardenManager gardenManager)
 {
     CurrentAvailableSlotAmount = StartingSlotAmount;
     CurrentFeedAmount          = 0;
     CurrentFeedRarity          = -1;
     IsUnlocked           = false;
     FillImage.fillAmount = 0;
     GardenManagerRef     = gardenManager;
 }
예제 #2
0
        public void InitShopItem(Seed seed, GardenManager gmRef)
        {
            ItemImage.sprite     = seed.gameObject.GetComponent <Image>().sprite;
            BuyText.text         = "$ " + seed.Cost;
            DescriptionText.text = seed.DisplayName;
            ItemImage.color      = seed.Color;

            GardenManagerRef = gmRef;
            SeedRef          = seed;
        }
예제 #3
0
        public void InitFeederModal(Feeder feeder, GardenManager gardenManager)
        {
            FeederRef        = feeder;
            GardenManagerRef = gardenManager;

            Dictionary <int, int> seedInventory = GardenManagerRef.GetSeeds();

            foreach (int seedId in seedInventory.Keys)
            {
                Seed       seedtype = GardenManagerRef.GetSeedTypeById(seedId);
                FeederItem item     = Instantiate <FeederItem>(FeederItemPrefab, ContentRoot.transform);
                item.InitFeederItem(seedtype, seedInventory[seedId], this);
            }
        }