Exemplo n.º 1
0
        public void OnIcon(GameObject go)
        {
            if (UnityEngine.Object.op_Equality((UnityEngine.Object)go, (UnityEngine.Object)null))
            {
                return;
            }
            this.mSelectIcon = (StoryPartIcon)null;
            if (UnityEngine.Object.op_Equality((UnityEngine.Object) this.mQuestSectionList, (UnityEngine.Object)null))
            {
                WorldMapController instance = WorldMapController.FindInstance(this.WorldMapControllerID);
                if (!UnityEngine.Object.op_Inequality((UnityEngine.Object)instance, (UnityEngine.Object)null))
                {
                    return;
                }
                this.mQuestSectionList = instance.SectionList;
            }
            StoryPartIcon component1 = (StoryPartIcon)go.GetComponent <StoryPartIcon>();

            if (UnityEngine.Object.op_Equality((UnityEngine.Object)component1, (UnityEngine.Object)null) || UnityEngine.Object.op_Equality((UnityEngine.Object) this.ScrollArea, (UnityEngine.Object)null))
            {
                return;
            }
            ScrollAutoFit component2 = (ScrollAutoFit)this.ScrollArea.GetComponent <ScrollAutoFit>();

            if (UnityEngine.Object.op_Equality((UnityEngine.Object)component2, (UnityEngine.Object)null))
            {
                return;
            }
            IEnumerator enumerator = ((Component)this).get_transform().GetEnumerator();

            try
            {
                while (enumerator.MoveNext())
                {
                    Transform current = (Transform)enumerator.Current;
                    if (((Component)current).get_gameObject().get_activeSelf() && UnityEngine.Object.op_Equality((UnityEngine.Object)((Component)component1).get_gameObject(), (UnityEngine.Object)((Component)current).get_gameObject()))
                    {
                        RectTransform component3 = (RectTransform)((Component)current).GetComponent <RectTransform>();
                        if (!UnityEngine.Object.op_Equality((UnityEngine.Object)component3, (UnityEngine.Object)null))
                        {
                            component2.SetScrollToHorizontal((float)-component3.get_anchoredPosition().x);
                            this.mSelectIcon = component1;
                            this.mCheckSelectIconMoveFlag = true;
                            FlowNode_GameObject.ActivateOutputLinks((Component)this, 103);
                            break;
                        }
                    }
                }
            }
            finally
            {
                IDisposable disposable = enumerator as IDisposable;
                if (disposable != null)
                {
                    disposable.Dispose();
                }
            }
        }
Exemplo n.º 2
0
        public void Activated(int pinID)
        {
            switch (pinID)
            {
            case 0:
                this.Refresh();
                break;

            case 1:
                WorldMapController instance = WorldMapController.FindInstance(this.WorldMapControllerID);
                if (!Object.op_Inequality((Object)instance, (Object)null))
                {
                    break;
                }
                instance.GotoArea((string)null);
                break;

            case 3:
                GlobalVars.SelectedChapter.Set((string)null);
                this.Refresh();
                break;

            case 4:
                ChapterParam area = MonoSingleton <GameManager> .Instance.FindArea((string)GlobalVars.SelectedChapter);

                if (area != null)
                {
                    if (area.parent != null)
                    {
                        GlobalVars.SelectedChapter.Set(area.parent.iname);
                    }
                    else
                    {
                        GlobalVars.SelectedChapter.Set((string)null);
                    }
                    this.Refresh();
                    break;
                }
                this.ResetScroll();
                if (!string.IsNullOrEmpty((string)GlobalVars.SelectedSection) && this.IsSectionHidden((string)GlobalVars.SelectedSection))
                {
                    GlobalVars.SelectedChapter.Set((string)null);
                    this.Refresh();
                    break;
                }
                FlowNode_GameObject.ActivateOutputLinks((Component)this, 40);
                break;
            }
        }
Exemplo n.º 3
0
        private void Start()
        {
            if (Object.op_Inequality((Object)this.ItemTemplate, (Object)null))
            {
                ((Component)this.ItemTemplate).get_gameObject().SetActive(false);
            }
            if (this.RefreshOnStart)
            {
                this.Refresh();
            }
            WorldMapController instance = WorldMapController.FindInstance(this.WorldMapControllerID);

            if (!Object.op_Inequality((Object)instance, (Object)null))
            {
                return;
            }
            instance.SectionList = this;
        }
Exemplo n.º 4
0
        private void OnItemSelect(GameObject go)
        {
            UIQuestSectionData dataOfClass = DataSource.FindDataOfClass <UIQuestSectionData>(go, (UIQuestSectionData)null);

            GlobalVars.SelectedSection.Set(dataOfClass.SectionID);
            WorldMapController instance1 = WorldMapController.FindInstance(this.WorldMapControllerID);

            if (Object.op_Inequality((Object)instance1, (Object)null))
            {
                GameManager instance2 = MonoSingleton <GameManager> .Instance;
                for (int index = 0; index < instance2.Chapters.Length; ++index)
                {
                    if (instance2.Chapters[index].section == dataOfClass.SectionID)
                    {
                        instance1.GotoArea(instance2.Chapters[index].world);
                        break;
                    }
                }
            }
            FlowNode_GameObject.ActivateOutputLinks((Component)this, 100);
        }
Exemplo n.º 5
0
        private void OnItemSelect(GameObject go)
        {
            ChapterParam dataOfClass = DataSource.FindDataOfClass <ChapterParam>(go, (ChapterParam)null);

            if (dataOfClass == null)
            {
                return;
            }
            QuestParam[] availableQuests = MonoSingleton <GameManager> .Instance.Player.AvailableQuests;
            long         serverTime      = Network.GetServerTime();
            int          num1            = 0;
            int          num2            = 0;

            for (int index = 0; index < availableQuests.Length; ++index)
            {
                if (availableQuests[index].ChapterID == dataOfClass.iname && !availableQuests[index].IsMulti)
                {
                    ++num1;
                    if (availableQuests[index].IsJigen && !availableQuests[index].IsDateUnlock(serverTime))
                    {
                        ++num2;
                    }
                }
            }
            if (num1 > 0 && num1 == num2)
            {
                UIUtility.NegativeSystemMessage((string)null, LocalizedText.Get("sys.QUEST_OUT_OF_DATE"), (UIUtility.DialogResultEvent)null, (GameObject)null, false, -1);
            }
            else
            {
                GlobalVars.SelectedChapter.Set(dataOfClass.iname);
                WorldMapController instance = WorldMapController.FindInstance(this.WorldMapControllerID);
                if (Object.op_Inequality((Object)instance, (Object)null))
                {
                    instance.GotoArea(dataOfClass.world);
                }
                FlowNode_GameObject.ActivateOutputLinks((Component)this, 100);
            }
        }