private bool SendHold(EventTriggerType trigger, Vector2 pos) { bool flag = false; ButtonEvent.Event[] holdEvents = this.GetHoldEvents(trigger); if (holdEvents != null) { for (int index = 0; index < holdEvents.Length; ++index) { ButtonEvent.Event ev = holdEvents[index]; if (ev != null && !string.IsNullOrEmpty(ev.eventName) && this.isInteractable) { this.PlaySe(ev); SerializeValueList serializeValueList = new SerializeValueList(ev.valueList); serializeValueList.AddField("_self", ((Component)this).get_gameObject()); serializeValueList.AddField("_pos", pos); if (ev.ignoreLock) { ButtonEvent.ForceInvoke(ev.eventName, (object)serializeValueList); } else { ButtonEvent.Invoke(ev.eventName, (object)serializeValueList); } flag = true; } } } return(flag); }
private bool Send(ButtonEvent.Event[] evs, Vector2 pos, Vector2 vct) { bool flag = false; if (evs != null) { for (int index = 0; index < evs.Length; ++index) { ButtonEvent.Event ev = evs[index]; if (!string.IsNullOrEmpty(ev.eventName) && this.isInteractable) { this.PlaySe(ev); SerializeValueList serializeValueList = new SerializeValueList(ev.valueList); serializeValueList.AddField("_self", ((Component)this).get_gameObject()); serializeValueList.AddField("_pos", pos); serializeValueList.AddField("_vct", vct); if (ev.ignoreLock) { ButtonEvent.ForceInvoke(ev.eventName, (object)serializeValueList); } else { ButtonEvent.Invoke(ev.eventName, (object)serializeValueList); } flag = true; } } } return(flag); }
private void CacheToggleParam(GameObject toggle_parent_obj) { Toggle[] componentsInChildren = (Toggle[])toggle_parent_obj.GetComponentsInChildren <Toggle>(); for (int index = 0; index < componentsInChildren.Length; ++index) { try { UnitListFilterWindow.SelectType key = (UnitListFilterWindow.SelectType)Enum.Parse(typeof(UnitListFilterWindow.SelectType), ((UnityEngine.Object)componentsInChildren[index]).get_name()); ButtonEvent component = (ButtonEvent)((Component)componentsInChildren[index]).GetComponent <ButtonEvent>(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component, (UnityEngine.Object)null)) { ButtonEvent.Event @event = component.GetEvent("UNITFILTER_TGL_CHANGE"); if (@event != null) { @event.valueList.SetField("select", (int)key); } } this.m_Toggles.Add(key, componentsInChildren[index]); } catch (Exception ex) { Debug.LogError((object)("UnitSortWindow トグル名からSelectTypeを取得できない! > " + ((UnityEngine.Object)componentsInChildren[index]).get_name() + " ( Exception > " + ex.ToString() + " )")); } } }
public void PlaySe(ButtonEvent.Event ev) { if (ev.se < 0) { return; } SystemSound.Play((SystemSound.ECue)ev.se); }
public override void Initialize(FlowWindowBase.SerializeParamBase param) { base.Initialize(param); this.m_Param = param as UnitListSortWindow.SerializeParam; if (this.m_Param == null) { throw new Exception(this.ToString() + " > Failed serializeParam null."); } SerializeValueBehaviour childComponent = this.GetChildComponent <SerializeValueBehaviour>("sort"); this.m_ValueList = !UnityEngine.Object.op_Inequality((UnityEngine.Object)childComponent, (UnityEngine.Object)null) ? new SerializeValueList() : childComponent.list; GameObject gameObject = this.m_ValueList.GetGameObject("list"); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)gameObject, (UnityEngine.Object)null)) { Toggle[] componentsInChildren = (Toggle[])gameObject.GetComponentsInChildren <Toggle>(); for (int index = 0; index < componentsInChildren.Length; ++index) { try { UnitListSortWindow.SelectType key = (UnitListSortWindow.SelectType)Enum.Parse(typeof(UnitListSortWindow.SelectType), ((UnityEngine.Object)componentsInChildren[index]).get_name()); ButtonEvent component = (ButtonEvent)((Component)componentsInChildren[index]).GetComponent <ButtonEvent>(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component, (UnityEngine.Object)null)) { ButtonEvent.Event @event = component.GetEvent("UNITSORT_TGL_CHANGE"); if (@event != null) { if ((key & (UnitListSortWindow.SelectType) 16777215) != UnitListSortWindow.SelectType.NONE) { @event.valueList.SetField("section", (int)key); } if ((key & (UnitListSortWindow.SelectType) 251658240) != UnitListSortWindow.SelectType.NONE) { @event.valueList.SetField("alignment", (int)key); } } } this.m_Toggles.Add(key, componentsInChildren[index]); } catch (Exception ex) { Debug.LogError((object)("UnitSortWindow トグル名からSelectTypeを取得できない! > " + ((UnityEngine.Object)componentsInChildren[index]).get_name() + " ( Exception > " + ex.ToString() + " )")); } } } this.LoadSelectType(); this.Close(true); }
private void Setup(BannerParam[] _params) { if (_params == null || _params.Length <= 0) { DebugUtility.LogError("イベントバナーデータが存在しません"); } else if (UnityEngine.Object.op_Equality((UnityEngine.Object) this.EventBannerTemplate, (UnityEngine.Object)null)) { DebugUtility.LogError("テンプレートオブジェクトが指定されていません"); } else { this.m_EventBannerList.Clear(); for (int index = 0; index < _params.Length; ++index) { BannerParam bannerParam = _params[index]; int num = index; if (bannerParam != null) { GameObject gameObject = (GameObject)UnityEngine.Object.Instantiate <GameObject>((M0)this.EventBannerTemplate); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)gameObject, (UnityEngine.Object)null)) { gameObject.get_transform().SetParent(this.ListRoot, false); EventPopupListItem component1 = (EventPopupListItem)gameObject.GetComponent <EventPopupListItem>(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component1, (UnityEngine.Object)null)) { component1.SetupBannerParam(bannerParam); } ButtonEvent component2 = (ButtonEvent)gameObject.GetComponent <ButtonEvent>(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component2, (UnityEngine.Object)null)) { ButtonEvent.Event @event = component2.GetEvent("EVENTPOPUP_BANNER_SELECT"); if (@event != null) { @event.valueList.SetField("select", num); } } gameObject.SetActive(true); this.m_EventBannerList.Add(gameObject); } } } } }
public override void Refresh() { if (this.mConceptCardData == null) { return; } string firstGetUnit = this.mConceptCardData.Param.first_get_unit; if (string.IsNullOrEmpty(firstGetUnit)) { return; } UnitParam unitParam = this.GM.GetUnitParam(firstGetUnit); if (unitParam == null) { return; } if (Object.op_Inequality((Object)this.UnitIcon, (Object)null)) { MonoSingleton <GameManager> .Instance.ApplyTextureAsync(this.UnitIcon, unitParam == null?(string)null : AssetPath.UnitSkinIconSmall(unitParam, (ArtifactParam)null, (string)null)); } if (Object.op_Inequality((Object)this.UnitName, (Object)null)) { this.UnitName.set_text(unitParam.name); } if (!Object.op_Inequality((Object)this.UnitDetailBtn, (Object)null)) { return; } ButtonEvent.Event @event = this.UnitDetailBtn.GetEvent("CONCEPT_CARD_DETAIL_BTN_UNIT_DETAIL"); if (@event == null) { return; } @event.valueList.SetField("select_unit", unitParam.iname); }
private void RefreshResult(GachaDropData[] _drops, GameObject _block, int _block_type, bool _is_anim = false) { if (_drops == null || _drops.Length < 0 || UnityEngine.Object.op_Equality((UnityEngine.Object)_block, (UnityEngine.Object)null)) { return; } _block.SetActive(true); int length = _drops.Length; SerializeValueBehaviour component1 = (SerializeValueBehaviour)_block.GetComponent <SerializeValueBehaviour>(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component1, (UnityEngine.Object)null)) { GameObject gameObject1 = component1.list.GetGameObject("icon"); gameObject1.SetActive(false); for (int index1 = 0; index1 < length; ++index1) { GachaDropData drop = _drops[index1]; int num = index1; GachaResultThumbnailWindow.GachaResultType gachaResultType = GachaResultThumbnailWindow.GachaResultType.None; if (drop != null) { GameObject gameObject2 = (GameObject)UnityEngine.Object.Instantiate <GameObject>((M0)gameObject1); gameObject2.get_transform().SetParent(gameObject1.get_transform().get_parent(), false); ((Behaviour)gameObject2.GetComponent <Animator>()).set_enabled(_is_anim); SerializeValueBehaviour component2 = (SerializeValueBehaviour)gameObject2.GetComponent <SerializeValueBehaviour>(); if (!UnityEngine.Object.op_Equality((UnityEngine.Object)component2, (UnityEngine.Object)null)) { GameObject gameObject3 = (GameObject)null; if (drop.type == GachaDropData.Type.Unit) { gameObject3 = component2.list.GetGameObject("unit"); DataSource.Bind <UnitData>(gameObject3, this.CreateUnitData(drop.unit)); gachaResultType = GachaResultThumbnailWindow.GachaResultType.Unit; } else if (drop.type == GachaDropData.Type.Item) { gameObject3 = component2.list.GetGameObject("item"); DataSource.Bind <ItemData>(gameObject3, this.CreateItemData(drop.item, drop.num)); ItemIcon component3 = (ItemIcon)gameObject3.GetComponent <ItemIcon>(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component3, (UnityEngine.Object)null)) { component3.UpdateValue(); } gachaResultType = !string.IsNullOrEmpty(drop.item.Flavor) ? GachaResultThumbnailWindow.GachaResultType.Item : GachaResultThumbnailWindow.GachaResultType.Piece; } else if (drop.type == GachaDropData.Type.Artifact) { gameObject3 = component2.list.GetGameObject("artifact"); DataSource.Bind <ArtifactData>(gameObject3, this.CreateArtifactData(drop.artifact, drop.Rare)); gachaResultType = GachaResultThumbnailWindow.GachaResultType.Artifact; } else if (drop.type == GachaDropData.Type.ConceptCard) { gameObject3 = component2.list.GetGameObject("conceptcard"); ConceptCardData cardDataForDisplay = ConceptCardData.CreateConceptCardDataForDisplay(drop.conceptcard.iname); ConceptCardIcon component3 = (ConceptCardIcon)gameObject3.GetComponent <ConceptCardIcon>(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component3, (UnityEngine.Object)null)) { component3.Setup(cardDataForDisplay); SerializeValueBehaviour component4 = (SerializeValueBehaviour)gameObject3.GetComponent <SerializeValueBehaviour>(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component4, (UnityEngine.Object)null)) { GameObject gameObject4 = component4.list.GetGameObject("unit_icon"); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)gameObject4, (UnityEngine.Object)null)) { UnitData data = (UnitData)null; if (drop.cardunit != null) { data = this.CreateUnitData(drop.cardunit); } DataSource.Bind <UnitData>(gameObject4, data); gameObject4.SetActive(drop.cardunit != null); } GameObject gameObject5 = component4.list.GetGameObject("skin"); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)gameObject5, (UnityEngine.Object)null)) { bool flag = false; if (drop.conceptcard.effects != null && drop.conceptcard.effects.Length > 0) { for (int index2 = 0; index2 < drop.conceptcard.effects.Length; ++index2) { ConceptCardEffectsParam effect = drop.conceptcard.effects[index2]; if (effect != null && !string.IsNullOrEmpty(effect.skin)) { flag = true; break; } } } gameObject5.SetActive(flag); } } } gachaResultType = GachaResultThumbnailWindow.GachaResultType.ConceptCard; } if (UnityEngine.Object.op_Equality((UnityEngine.Object)gameObject3, (UnityEngine.Object)null)) { DebugUtility.LogError("アイコンオブジェクトがありません"); break; } SerializeValueBehaviour component5 = (SerializeValueBehaviour)gameObject3.GetComponent <SerializeValueBehaviour>(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component5, (UnityEngine.Object)null)) { GameObject gameObject4 = component5.list.GetGameObject("new"); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component5, (UnityEngine.Object)null)) { gameObject4.SetActive(drop.isNew); } } ButtonEvent component6 = (ButtonEvent)gameObject3.GetComponent <ButtonEvent>(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component6, (UnityEngine.Object)null)) { ButtonEvent.Event @event = component6.GetEvent("CLICK_ICON"); if (@event != null) { @event.valueList.SetField("index", num); @event.valueList.SetField("type", (int)gachaResultType); @event.valueList.SetField("block", _block_type); if (gachaResultType == GachaResultThumbnailWindow.GachaResultType.ConceptCard) { @event.valueList.SetField("is_first_get_unit", drop.cardunit != null); } } } gameObject3.SetActive(true); this.m_ResultIconRootList.Add(gameObject2); if (_block_type == 0) { this.m_ResultIconRootList.Add(gameObject2); } } else { break; } } } } SerializeValueBehaviour component7 = (SerializeValueBehaviour)((Component)this).get_gameObject().GetComponent <SerializeValueBehaviour>(); if (!UnityEngine.Object.op_Inequality((UnityEngine.Object)component7, (UnityEngine.Object)null)) { return; } GameObject gameObject = component7.list.GetGameObject("space"); if (!UnityEngine.Object.op_Inequality((UnityEngine.Object)gameObject, (UnityEngine.Object)null)) { return; } gameObject.get_transform().SetAsLastSibling(); gameObject.SetActive(length > GachaResultThumbnailWindow.VIEW_COUNT); }