/*public void CraftingClick() * { * Debug.Log(thisSeed.name); * IS.SetCraftingObject(thisSeed); * }*/ public void StartSeedDrag() { Debug.Log("SpawningNewSeed"); IslandScript island = WorldSelector.Instance.SelectedIsland.GetComponent <IslandScript>(); if (island.currentTreePopulation >= island.maxTreePopulation) { return; } GameObject NewSeed = Instantiate(IS.FindSeed(thisSeed.name).objectToSpawn); TouchController.Instance.seedBeingDragged = NewSeed; IS.inventoryPanel.SetActive(false); }
public void SetUpButton(SeedInInventory newSeed) { IS = InventoryScript.Instance; thisSeed = newSeed; childImage.sprite = IS.FindSeed(thisSeed.name).sprite; childAmtCounter.text = "x" + thisSeed.amt; if (thisSeed.amt <= 0) { this.GetComponent <Button>().interactable = false; } }