public void Show() { gameObject.SetActive(true); if (!buildableAreaManager) { buildableAreaManager = GameObject.Find("GameManager").GetComponent <BuildableAreaManager>(); } selectedTile = buildableAreaManager.GetSelectedItem(); }
public void Init(CraftingRecipe _recipe) { inventoryManager = GameObject.Find("GameManager").GetComponent <InventoryManager>(); buildableAreaManager = GameObject.Find("GameManager").GetComponent <BuildableAreaManager>(); itemBackground = GetComponent <Image>(); recipe = _recipe; itemName.text = recipe.output.item.name; image.sprite = recipe.output.item.sprite; UpdateTooltip(); }
void Start() { buildableAreaManager = GameObject.Find("GameManager").GetComponent <BuildableAreaManager>(); }