Ejemplo n.º 1
0
    void Start()
    {
        buttonContainer = transform.parent.parent;

        foreach(Transform t in buttonContainer.parent.transform)
        {
            if(t.GetComponent<RequirementDisplayer>() != null)
            {
                displayer = t.GetComponent<RequirementDisplayer>();
                break;
            }
        }

        if (holdedRecipe == null)
        {
            holdedRecipe = displayer.database.Recipes[transform.GetSiblingIndex()];
        }
    }
Ejemplo n.º 2
0
    void Start()
    {
        buttonContainer = transform.parent.parent;

        foreach (Transform t in buttonContainer.parent.transform)
        {
            if (t.GetComponent <RequirementDisplayer>() != null)
            {
                displayer = t.GetComponent <RequirementDisplayer>();
                break;
            }
        }

        if (holdedRecipe == null)
        {
            holdedRecipe = displayer.database.Recipes[transform.GetSiblingIndex()];
        }
    }