public void Activated(int pinID) { switch (pinID) { case 0: this.RefreshAll(); break; case 1: SerializeValueList currentValue = FlowNode_ButtonEvent.currentValue as SerializeValueList; if (currentValue == null) { break; } UnitTobiraItem item = currentValue.GetComponent <UnitTobiraItem>("_self"); if (UnityEngine.Object.op_Equality((UnityEngine.Object)item, (UnityEngine.Object)null)) { break; } this.mSelectedTobiraCategory = item.Category; GlobalVars.PreBattleUnitTobiraCategory.Set(this.mSelectedTobiraCategory); this.mCurrentTobira = this.mCurrentUnit.TobiraData.Find((Predicate <TobiraData>)(tobira => tobira.Param.TobiraCategory == item.Category)); this.mTobiraList.ForEach((Action <UnitTobiraItem>)(tobira => tobira.Select(tobira.Category == item.Category))); this.TobiraParamWindow.Refresh(this.mCurrentUnit, this.mCurrentTobira, item.Param); UnitEnhanceV3.Instance.RefreshTobiraBgAnimation(this.mCurrentTobira, false); break; case 2: this.OnTobiraOpenBtn(); break; case 3: this.OnTobiraEnhanceBtn(); break; case 5: this.RefreshCurrentUnit(); this.SuccessTobiraEnhance(); break; case 6: this.RefreshCurrentUnit(); this.SuccessTobiraOpen(); break; case 7: UnitEnhanceV3.Instance.TobiraUIActive(false, false); break; } }
private void Start() { if (FlowNode_ButtonEvent.currentValue == null) { return; } SerializeValueList currentValue = FlowNode_ButtonEvent.currentValue as SerializeValueList; if (currentValue == null) { return; } ConceptCardIcon component = currentValue.GetComponent <ConceptCardIcon>("_self"); if (Object.op_Equality((Object)component, (Object)null)) { return; } this.mConceptCardData = component.ConceptCard; if (this.mConceptCardData == null) { return; } if (Object.op_Inequality((Object)this.mIllustImage, (Object)null)) { string path = AssetPath.ConceptCard(this.mConceptCardData.Param); if (((Object)this.mIllustImage.get_mainTexture()).get_name() != Path.GetFileName(path)) { MonoSingleton <GameManager> .Instance.ApplyTextureAsync(this.mIllustImage, path); } } if (Object.op_Inequality((Object)this.mIllustFrame, (Object)null)) { this.mIllustFrame.ImageIndex = Mathf.Min(Mathf.Max((int)this.mConceptCardData.Rarity, 0), this.mIllustFrame.Images.Length - 1); } this.SetText(this.mCardNameText, this.mConceptCardData.Param.name); this.SetFlavorTextText(); if (Object.op_Inequality((Object)this.mStarGauge, (Object)null)) { this.mStarGauge.Max = (int)this.mConceptCardData.Rarity + 1; this.mStarGauge.Value = (int)this.mConceptCardData.Rarity + 1; } foreach (Scrollbar componentsInChild in (Scrollbar[])((Component)this).GetComponentsInChildren <Scrollbar>()) { componentsInChild.set_value(1f); } }
private void SelectCardIcon() { SerializeValueList currentValue = FlowNode_ButtonEvent.currentValue as SerializeValueList; if (currentValue == null) { return; } ConceptCardIcon component = currentValue.GetComponent <ConceptCardIcon>("_self"); this.mConceptCardEquipList.SelectCardIcon(component); this.SetActiveParamViewObject(Object.op_Equality((Object)component, (Object)null)); this.mSelectedCardData = !Object.op_Inequality((Object)component, (Object)null) ? (ConceptCardData)null : component.ConceptCard; if (this.mSelectedCardData == null || this.mSelectedUnit == null) { return; } this.SetParam(this.mSelectedCardData, this.mSelectedUnit, this.mSelectedUnit.JobIndex); }
private void Start() { this.mMoveRect = (RectTransform)null; this.mQuestSectionList = (QuestSectionList)null; this.ReleaseStoryPartIcon = (StoryPartIcon)null; this.AnimationReleaseFlag = false; this.mSelectIconNum = 1; this.mSelectIcon = (StoryPartIcon)null; this.mCheckSelectIconMoveFlag = false; this.mSelectBeforeIcon = (StoryPartIcon)null; this.mNextButton = (Button)null; if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.PageNext, (UnityEngine.Object)null)) { this.mNextButton = (Button)this.PageNext.GetComponent <Button>(); } this.mPrevButton = (Button)null; if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.PagePrev, (UnityEngine.Object)null)) { this.mPrevButton = (Button)this.PagePrev.GetComponent <Button>(); } SerializeValueList currentValue = FlowNode_ButtonEvent.currentValue as SerializeValueList; if (currentValue != null) { this.mQuestSectionList = currentValue.GetComponent <QuestSectionList>("_self"); } this.mReleaseAction = MonoSingleton <GameManager> .Instance.CheckReleaseStoryPart(); this.SetRangeFlag = false; this.TemplateGo.SetActive(false); this.TemplatePageIcon.SetActive(false); int storyPartNum = MonoSingleton <GameManager> .Instance.GetStoryPartNum(); int partNumPresentTime = MonoSingleton <GameManager> .Instance.GetStoryPartNumPresentTime(); Vector2.get_zero(); for (int index = 0; index < storyPartNum; ++index) { GameObject gameObject1 = (GameObject)UnityEngine.Object.Instantiate <GameObject>((M0)this.TemplateGo); Vector2 vector2_1 = Vector2.op_Implicit(gameObject1.get_transform().get_localScale()); gameObject1.get_transform().SetParent(((Component)this).get_transform()); gameObject1.get_transform().set_localScale(Vector2.op_Implicit(vector2_1)); gameObject1.get_gameObject().SetActive(true); ((UnityEngine.Object)gameObject1).set_name(((UnityEngine.Object) this.TemplateGo).get_name() + (index + 1).ToString()); StoryPartIcon component = (StoryPartIcon)gameObject1.GetComponent <StoryPartIcon>(); if (this.mReleaseAction && index + 1 == partNumPresentTime) { component.Setup(true, index + 1); this.ReleaseStoryPartIcon = component; } else if (!component.Setup(index + 1 > partNumPresentTime, index + 1)) { UnityEngine.Object.Destroy((UnityEngine.Object)gameObject1); continue; } this.mStoryPartIconList.Add(component); Toggle toggle = (Toggle)null; if (storyPartNum > 1) { GameObject gameObject2 = (GameObject)UnityEngine.Object.Instantiate <GameObject>((M0)this.TemplatePageIcon); Vector2 vector2_2 = Vector2.op_Implicit(gameObject2.get_transform().get_localScale()); gameObject2.get_transform().SetParent(this.TogglePagesGroup.get_transform()); gameObject2.get_transform().set_localScale(Vector2.op_Implicit(vector2_2)); gameObject2.get_gameObject().SetActive(true); ((UnityEngine.Object)gameObject2).set_name(((UnityEngine.Object) this.TemplatePageIcon).get_name() + (index + 1).ToString()); toggle = (Toggle)gameObject2.GetComponent <Toggle>(); this.mPageIconList.Add(toggle); } if (this.mReleaseAction) { if (index + 1 == partNumPresentTime) { this.mMoveRect = (RectTransform)gameObject1.GetComponent <RectTransform>(); this.mSelectIconNum = partNumPresentTime; if (UnityEngine.Object.op_Inequality((UnityEngine.Object)toggle, (UnityEngine.Object)null)) { toggle.set_isOn(true); } } } else if (index + 1 == GlobalVars.SelectedStoryPart.Get()) { this.mMoveRect = (RectTransform)gameObject1.GetComponent <RectTransform>(); this.mSelectIconNum = partNumPresentTime; if (UnityEngine.Object.op_Inequality((UnityEngine.Object)toggle, (UnityEngine.Object)null)) { toggle.set_isOn(true); } } } if (storyPartNum != 1) { return; } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.PageNext, (UnityEngine.Object)null)) { this.PageNext.SetActive(false); } if (!UnityEngine.Object.op_Inequality((UnityEngine.Object) this.PagePrev, (UnityEngine.Object)null)) { return; } this.PagePrev.SetActive(false); }