Esempio n. 1
0
        private void RefreshSlots(GenericSlot slot, ConceptCardIcon icon, ConceptCardData card, bool is_locked, bool enable)
        {
            if (Object.op_Equality((Object)slot, (Object)null) || Object.op_Equality((Object)icon, (Object)null))
            {
                return;
            }
            slot.SetLocked(is_locked);
            slot.SetSlotData <ConceptCardData>(card);
            icon.Setup(card);
            SRPG_Button componentInChildren = (SRPG_Button)((Component)slot).get_gameObject().GetComponentInChildren <SRPG_Button>();

            if (!Object.op_Inequality((Object)componentInChildren, (Object)null))
            {
                return;
            }
            ((Behaviour)componentInChildren).set_enabled(enable);
            ((UnityEventBase)componentInChildren.get_onClick()).RemoveAllListeners();
            // ISSUE: method pointer
            ((UnityEvent)componentInChildren.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(OnEquipCardSlot)));
        }
Esempio n. 2
0
        private void RefreshSlots(GenericSlot slot, ArtifactData[] list, int index, int job_rank, bool is_locked = false, bool enable = true)
        {
            if (!UnityEngine.Object.op_Inequality((UnityEngine.Object)slot, (UnityEngine.Object)null))
            {
                return;
            }
            ArtifactData data = (ArtifactData)null;

            if (job_rank > 0 && list.Length > index)
            {
                data = list[index];
            }
            slot.SetLocked(!is_locked);
            slot.SetSlotData <ArtifactData>(data);
            SRPG_Button componentInChildren = (SRPG_Button)((Component)slot).get_gameObject().GetComponentInChildren <SRPG_Button>();

            if (!UnityEngine.Object.op_Inequality((UnityEngine.Object)componentInChildren, (UnityEngine.Object)null))
            {
                return;
            }
            ((Behaviour)componentInChildren).set_enabled(enable);
        }