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 RefreshStatus() { if (this.mCurrentUnit == null || UnityEngine.Object.op_Equality((UnityEngine.Object) this.TobiraTemplate, (UnityEngine.Object)null)) { return; } DataSource.Bind <UnitData>(this.UnitAttachTarget, this.mCurrentUnit); GameParameter.UpdateAll(this.UnitAttachTarget); this.TobiraTemplate.SetActive(false); this.mTobiraList.ForEach((Action <UnitTobiraItem>)(tobira => UnityEngine.Object.Destroy((UnityEngine.Object)((Component)tobira).get_gameObject()))); this.mTobiraList.Clear(); for (int index = 1; index < 8; ++index) { GameObject gameObject = (GameObject)UnityEngine.Object.Instantiate <GameObject>((M0)this.TobiraTemplate); gameObject.get_transform().SetParent(this.TobiraTemplate.get_transform().get_parent(), false); gameObject.SetActive(true); UnitTobiraItem component = (UnitTobiraItem)gameObject.GetComponent <UnitTobiraItem>(); if (!UnityEngine.Object.op_Equality((UnityEngine.Object)component, (UnityEngine.Object)null)) { component.Initialize(this.mCurrentUnit, (TobiraParam.Category)index); this.mTobiraList.Add(component); } } }