// Start is called before the first frame update
    void Start()
    {
        Shop = GetComponentInParent <TutorialShop>(); // Set shop

        // Get shop item from name
        ShopItem = Shop.ShopItems.FirstOrDefault(shopItem => shopItem.Name == ShopItemName);
        if (ShopItem == null)
        {
            Debug.LogWarning("Couldn't find shop item object for " + ShopItemName);
            BuyButton.interactable = false; // disable button
            text.text = "--";               // update buy button text
            return;
        }

        BuyButton.onClick.AddListener(() => Shop.BuyItem(ShopItem));

        Shop.UpdateBuyButtonVisual(ShopItem);
    }
 // Use this for initialization
 void Start()
 {
     shop = transform.root.gameObject.GetComponent <TutorialShop>();
 }
 // Use this for initialization
 void Start()
 {
     shop = GetComponent<TutorialShop>();
     cartList = new Dictionary<int, int>();
 }
 // Use this for initialization
 void Start()
 {
     shop     = GetComponent <TutorialShop>();
     cartList = new Dictionary <int, int>();
 }
 // Use this for initialization
 void Start()
 {
     shop = transform.root.gameObject.GetComponent<TutorialShop>();
 }