Example #1
0
        public void Touch(ContactData contact, int playerId)
        {
            upgrade.Apply();

            // Hide the menu.
            App.Instance.Model.Players[playerId].ShowMenu(false);
            App.Instance.Model.Players[playerId].CanUpgrade = false;
        }
Example #2
0
    private void InitUIElements()
    {
        upgradeNameUI  = transform.Find("Name").GetComponent <Text>();
        descriptionUI  = transform.Find("Description").GetComponent <Text>();
        priceValueUI   = transform.Find("PriceValue").GetComponent <Text>();
        buttomApplyUI  = transform.Find("Button - Buy").GetComponent <Button>();
        productImageUI = transform.Find("ProductSprite").GetComponent <Image>();

        buttomApplyUI.onClick.AddListener(delegate { upgrade.Apply(); });
    }