Example #1
0
 void Start()
 {
     coin   = FindObjectOfType <Coin>();
     button = GetComponent <Button>();
     donationValidityCheck      = FindObjectOfType <DonationValidityCheck>();
     confirmButton.interactable = false;
     EventBroker.Instance().SubscribeMessage <EventUpdateAlternativesButtons>(OnButtonsInteractable);
     EventBroker.Instance().SubscribeMessage <EventTogglePopWindow>(OnClosePopUpWindow);
 }
Example #2
0
        public void ClearSlot()
        {
            donationValidityCheck = FindObjectOfType <DonationValidityCheck>();
            var go = EventSystem.current.currentSelectedGameObject;

            if (go.transform.childCount <= 0)
            {
                return;
            }
            Destroy(EventSystem.current.currentSelectedGameObject.transform.GetChild(0).gameObject);
            Destroy(donationValidityCheck.upgradedItemSlot.transform.GetChild(0).gameObject);
        }