Esempio n. 1
0
    void Awake()
    {
        // attach the button to the script for testing...
        Button     button     = GetComponent <Button>();
        Ingredient ingredient = GetComponent <Ingredient>();

        button.onClick.AddListener(() => ingredient.AddToGlass());
    }