Esempio n. 1
0
    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();
    }
Esempio n. 3
0
 void Start()
 {
     buildableAreaManager = GameObject.Find("GameManager").GetComponent <BuildableAreaManager>();
 }