Ejemplo n.º 1
0
    private void OnEnable()
    {
        storeManager = FindObjectOfType <StoreManager>();

        itemIcon.sprite = weapon.graphic;
        itemName.text   = weapon.name;
        itemPrice.text  = weapon.price.ToString();
        buyButton.onClick.AddListener(() => { storeManager.BuyWeapon(weapon); });
    }