コード例 #1
0
        private void OnEvent_ToolTip()
        {
            if (Object.op_Inequality((Object)this.m_ToolTip, (Object)null))
            {
                return;
            }
            SerializeValueList currentValue = FlowNode_ButtonEvent.currentValue as SerializeValueList;

            if (currentValue == null)
            {
                return;
            }
            UnitData dataSource = currentValue.GetDataSource <UnitData>("_self");

            if (dataSource == null || string.IsNullOrEmpty(this.ToolTipPrefab))
            {
                return;
            }
            GameObject root = (GameObject)Object.Instantiate <GameObject>((M0)AssetManager.Load <GameObject>(this.ToolTipPrefab));

            DataSource.Bind <UnitData>(root, dataSource);
            UnitJobDropdown componentInChildren1 = (UnitJobDropdown)root.GetComponentInChildren <UnitJobDropdown>();

            if (Object.op_Inequality((Object)componentInChildren1, (Object)null))
            {
                ((Component)componentInChildren1).get_gameObject().SetActive(true);
                Selectable component1 = (Selectable)((Component)componentInChildren1).get_gameObject().GetComponent <Selectable>();
                if (Object.op_Inequality((Object)component1, (Object)null))
                {
                    component1.set_interactable(false);
                }
                Image component2 = (Image)((Component)componentInChildren1).get_gameObject().GetComponent <Image>();
                if (Object.op_Inequality((Object)component2, (Object)null))
                {
                    ((Graphic)component2).set_color(new Color(0.5f, 0.5f, 0.5f));
                }
            }
            ArtifactSlots componentInChildren2 = (ArtifactSlots)root.GetComponentInChildren <ArtifactSlots>();
            AbilitySlots  componentInChildren3 = (AbilitySlots)root.GetComponentInChildren <AbilitySlots>();

            if (Object.op_Inequality((Object)componentInChildren2, (Object)null) && Object.op_Inequality((Object)componentInChildren3, (Object)null))
            {
                componentInChildren2.Refresh(false);
                componentInChildren3.Refresh(false);
            }
            ConceptCardSlots componentInChildren4 = (ConceptCardSlots)root.GetComponentInChildren <ConceptCardSlots>();

            if (Object.op_Inequality((Object)componentInChildren4, (Object)null))
            {
                componentInChildren4.Refresh(false);
            }
            GameParameter.UpdateAll(root);
            this.m_ToolTip = root;
        }
コード例 #2
0
        public void Activated(int pinID)
        {
            switch (pinID)
            {
            case 0:
                this.Refresh();
                break;

            case 50:
                SerializeValueList currentValue1 = FlowNode_ButtonEvent.currentValue as SerializeValueList;
                if (currentValue1 == null)
                {
                    break;
                }
                TobiraEnhanceRecipe dataSource = currentValue1.GetDataSource <TobiraEnhanceRecipe>("_self");
                if (dataSource == null)
                {
                    break;
                }
                this.RefreshSubPanel(dataSource.Index);
                break;

            case 51:
                SerializeValueList currentValue2 = FlowNode_ButtonEvent.currentValue as SerializeValueList;
                if (currentValue2 == null)
                {
                    break;
                }
                QuestParam dataOfClass = DataSource.FindDataOfClass <QuestParam>(currentValue2.GetGameObject("_self"), (QuestParam)null);
                if (dataOfClass == null)
                {
                    break;
                }
                this.OnQuestSelect(dataOfClass);
                break;

            case 100:
                if (this.OnCallback != null)
                {
                    this.OnCallback();
                }
                FlowNode_GameObject.ActivateOutputLinks((Component)this, 102);
                break;
            }
        }
コード例 #3
0
        public override int OnActivate(int pinId)
        {
            switch (pinId)
            {
            case 100:
                this.InitializeContentList();
                this.RefreshUI();
                this.Open();
                break;

            case 110:
                this.m_Destroy = true;
                this.Close(false);
                break;

            case 120:
                SerializeValueList currentValue = FlowNode_ButtonEvent.currentValue as SerializeValueList;
                if (currentValue != null)
                {
                    MultiInvitationSendWindow.Content.ItemAccessor dataSource = currentValue.GetDataSource <MultiInvitationSendWindow.Content.ItemAccessor>("_self");
                    if (dataSource != null && dataSource.isValid)
                    {
                        string uid = dataSource.friend.UID;
                        if (!this.IsSendList(uid))
                        {
                            dataSource.isOn = true;
                            this.m_SendList.Add(uid);
                            break;
                        }
                        dataSource.isOn = false;
                        this.m_SendList.Remove(uid);
                        break;
                    }
                    break;
                }
                break;

            case 130:
                return(190);
            }
            return(-1);
        }
コード例 #4
0
        public override int OnActivate(int pinId)
        {
            switch (pinId)
            {
            case 200:
                if (this.SetTab(MultiInvitationReceiveWindow.Tab.ACTIVE))
                {
                    this.InitializeActiveList();
                    this.InitializeLogList();
                }
                MultiInvitationBadge.isValid = false;
                this.Open();
                break;

            case 210:
                this.m_Destroy = true;
                this.Close(false);
                break;

            case 220:
                if (this.SetTab(MultiInvitationReceiveWindow.Tab.ACTIVE))
                {
                    this.InitializeActiveList();
                }
                return(300);

            case 230:
                if (this.SetTab(MultiInvitationReceiveWindow.Tab.LOG))
                {
                    this.InitializeLogList();
                }
                return(300);

            case 240:
                SerializeValueList currentValue = FlowNode_ButtonEvent.currentValue as SerializeValueList;
                if (currentValue != null)
                {
                    MultiInvitationReceiveWindow.ActiveData.RoomData dataSource = currentValue.GetDataSource <MultiInvitationReceiveWindow.ActiveData.RoomData>("item");
                    if (dataSource != null)
                    {
                        GlobalVars.SelectedMultiPlayRoomID   = dataSource.roomid;
                        GlobalVars.MultiInvitation           = (int)dataSource.multiType;
                        GlobalVars.MultiInvitationRoomOwner  = dataSource.owner.fuid;
                        GlobalVars.MultiInvitationRoomLocked = dataSource.locked;
                        string eventName = "MENU_MULTI";
                        if (dataSource.multiType == MultiInvitationReceiveWindow.MultiType.TOWER)
                        {
                            eventName = "MENU_MULTITOWER";
                            GameManager instance = MonoSingleton <GameManager> .Instance;
                            GlobalVars.SelectedMultiTowerID = dataSource.quest.param.iname;
                        }
                        GlobalEvent.Invoke(eventName, (object)null);
                        this.m_Destroy = true;
                        this.Close(false);
                        break;
                    }
                    break;
                }
                break;

            case 250:
                this.InitializeActiveList();
                break;

            case 260:
                this.InitializeLogList();
                break;
            }
            return(-1);
        }