Beispiel #1
0
    void addRes(BaseItem item)
    {
        CraftingInterfaceItem inst = new CraftingInterfaceItem();
        GameObject            temp = Instantiate(resultPrefab) as GameObject;

        temp.transform.SetParent(result_Group.gameObject.transform);
        temp.transform.localScale = new Vector3(1, 1, 1);
        inst = temp.GetComponent <CraftingInterfaceItem>();
        temp.GetComponent <Toggle>().group = resultsGroup;
        inst.buttonInit(item, "");
    }
Beispiel #2
0
    void addIng(BaseItem item, int amount)
    {
        CraftingInterfaceItem inst = new CraftingInterfaceItem();
        GameObject            temp = Instantiate(buttonPrefab) as GameObject;

        temp.transform.SetParent(ing_Group.gameObject.transform);
        temp.transform.localScale = new Vector3(1, 1, 1);
        inst = temp.GetComponent <CraftingInterfaceItem>();
        temp.GetComponent <Toggle>().group = ingredientsGroup;
        inst.buttonInit(item, amount.ToString());
    }