public static void Invoke() { SceneBattle instance = SceneBattle.Instance; if (Object.op_Implicit((Object)instance) && !instance.IsControlBattleUI(SceneBattle.eMaskBattleUI.BACK_KEY)) { return; } for (int count = BackHandler.mHdls.Count; 0 < count; --count) { BackHandler mHdl = BackHandler.mHdls[count - 1]; if (!Object.op_Equality((Object)null, (Object)mHdl)) { ButtonEvent component1 = (ButtonEvent)((Component)mHdl).get_gameObject().GetComponent <ButtonEvent>(); if (Object.op_Inequality((Object)component1, (Object)null)) { GraphicRaycaster componentInParent = (GraphicRaycaster)((Component)mHdl).get_gameObject().GetComponentInParent <GraphicRaycaster>(); if (!Object.op_Equality((Object)componentInParent, (Object)null) && ((Behaviour)componentInParent).get_enabled()) { Graphic component2 = (Graphic)((Component)mHdl).get_gameObject().GetComponent <Graphic>(); if (!Object.op_Equality((Object)component2, (Object)null) && ((Behaviour)component2).get_enabled() && component2.get_raycastTarget()) { CanvasGroup[] componentsInParent = (CanvasGroup[])((Component)mHdl).GetComponentsInParent <CanvasGroup>(); bool flag = false; for (int index = 0; index < componentsInParent.Length; ++index) { if (!componentsInParent[index].get_blocksRaycasts()) { flag = true; break; } if (componentsInParent[index].get_ignoreParentGroups()) { break; } } if (!flag) { PointerEventData data = new PointerEventData(EventSystem.get_current()); data.set_position(Vector2.op_Implicit(((Component)mHdl).get_gameObject().get_transform().get_position())); data.set_clickCount(1); component1.OnPointerClick(data); break; } } } } else { Button component2 = (Button)((Component)mHdl).get_gameObject().GetComponent <Button>(); if (Object.op_Inequality((Object)null, (Object)component2)) { GraphicRaycaster componentInParent = (GraphicRaycaster)((Component)mHdl).get_gameObject().GetComponentInParent <GraphicRaycaster>(); if (!Object.op_Equality((Object)null, (Object)componentInParent) && ((Behaviour)componentInParent).get_enabled()) { CanvasGroup[] componentsInParent = (CanvasGroup[])((Component)mHdl).GetComponentsInParent <CanvasGroup>(); bool flag = false; for (int index = 0; index < componentsInParent.Length; ++index) { if (!componentsInParent[index].get_blocksRaycasts()) { flag = true; break; } if (componentsInParent[index].get_ignoreParentGroups()) { break; } } if (!flag) { PointerEventData pointerEventData = new PointerEventData(EventSystem.get_current()); pointerEventData.set_position(Vector2.op_Implicit(((Component)mHdl).get_gameObject().get_transform().get_position())); pointerEventData.set_clickCount(1); component2.OnPointerClick(pointerEventData); break; } } } } } } }
public static void UnLock() { ButtonEvent.UnLock("system"); }
public override void OnClick(ContentNode node) { FriendPresentWantWindow.Content.clickItem = this.m_Accessor; ButtonEvent.Invoke("FRIENDPRESENT_WANTLIST_SELECT", (object)node); }
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); }
private void Initalize() { if (this.IsInialize) { this.RefreshIcons(true); if (this.IsFinishedBonus) { return; } ButtonEvent.Lock("gacha_initialize"); FlowNode_GameObject.ActivateOutputLinks((Component)this, 60); } else { if (GachaResultData.drops == null) { return; } if (GachaResultData.IsRedrawGacha) { GlobalEvent.Invoke("DISABLE_HOME_BUTTON", (object)this); } this.mRequest = (GachaRequestParam)null; GachaRequestParam dataOfClass = DataSource.FindDataOfClass <GachaRequestParam>(((Component)this).get_gameObject(), (GachaRequestParam)null); if (dataOfClass != null) { this.mRequest = dataOfClass; } this.SetDetailActiveStatus(false); this.is_gift = this.CheckIsGiftData(GachaResultData.drops); for (int index = 0; index < GachaResultData.drops.Length; ++index) { if (GachaResultData.drops[index].type == GachaDropData.Type.Unit) { MonoSingleton <GameManager> .Instance.Player.UpdateUnitTrophyStates(false); break; } } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.m_OnemoreBtn, (UnityEngine.Object)null)) { this.RefreshGachaCostObject(((Component)this.m_OnemoreBtn).get_gameObject()); ((Component)this.m_OnemoreBtn).get_gameObject().SetActive(GachaResultData.UseOneMore && !GachaResultData.IsRedrawGacha); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.m_BonusBtn, (UnityEngine.Object)null)) { ((Component)this.m_BonusBtn).get_gameObject().SetActive(GachaResultData.dropMails != null && GachaResultData.dropMails.Length > 0); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.m_RedrawBtn, (UnityEngine.Object)null)) { SerializeValueBehaviour component = (SerializeValueBehaviour)((Component)this.m_RedrawBtn).GetComponent <SerializeValueBehaviour>(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component, (UnityEngine.Object)null)) { GameObject gameObject = component.list.GetGameObject("option"); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)gameObject, (UnityEngine.Object)null)) { gameObject.SetActive(GachaResultData.IsPending); } Text uiLabel = component.list.GetUILabel("txt_count"); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)uiLabel, (UnityEngine.Object)null)) { string empty; if (GachaResultData.IsPending) { empty = LocalizedText.Get("sys.GACHA_REDRAW_COUNT_LIMIT", new object[1] { (object)GachaResultData.RedrawRest }); } else { empty = string.Empty; } string str = empty; uiLabel.set_text(str); } } ((Component)this.m_RedrawBtn).get_gameObject().SetActive(GachaResultData.IsRedrawGacha); ((Selectable)this.m_RedrawBtn).set_interactable(GachaResultData.IsPending && GachaResultData.RedrawRest > 0); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.m_DefaultBtn, (UnityEngine.Object)null)) { SerializeValueBehaviour component = (SerializeValueBehaviour)((Component)this.m_DefaultBtn).GetComponent <SerializeValueBehaviour>(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component, (UnityEngine.Object)null)) { component.list.GetUILabel("text").set_text(!GachaResultData.IsPending ? LocalizedText.Get("sys.BTN_GACHA_OK") : LocalizedText.Get("sys.BTN_DECIDE_CONFIRM")); } } this.Refresh(); this.m_inialize = true; } }
public void Activated(int pinID) { if (pinID == this.IN_REFRESH) { if (!this.m_inialize || !UnityEngine.Object.op_Inequality((UnityEngine.Object) this.m_Thumbnail, (UnityEngine.Object)null)) { return; } this.m_UnitDetail.SetActive(false); this.m_Thumbnail.SetActive(true); } else if (pinID == this.IN_BACKTO_UNITDETAIL) { if (this.CheckTutorial()) { this.m_inialize = false; FlowNode_GameObject.ActivateOutputLinks((Component)this, 210); } else { this.m_UnitDetail.SetActive(false); this.m_Thumbnail.SetActive(true); } } else if (pinID == this.IN_BACK_TOP) { if (GachaResultData.IsRedrawGacha) { FlowNode_GameObject.ActivateOutputLinks((Component)this, 80); } else { this.m_inialize = false; this.m_FinishedBonusEffect = false; FlowNode_GameObject.ActivateOutputLinks((Component)this, this.OUT_BACK_TOP); } } else if (pinID == this.IN_ONEMORE_GACHA) { this.m_inialize = false; this.m_FinishedBonusEffect = false; if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.m_Thumbnail, (UnityEngine.Object)null)) { this.m_Thumbnail.SetActive(false); } FlowNode_GameObject.ActivateOutputLinks((Component)this, this.OUT_ONEMORE_GACHA); } else { switch (pinID) { case 50: this.OnSelectIcon(); break; case 51: this.OnSelectCardUnitIcon(); break; case 61: if (!this.IsFinishedBonus && this.IsThumbnailActive()) { if (GachaResultData.dropMails != null && GachaResultData.dropMails.Length > 0) { this.StartCoroutine(this.ShowBonus(true)); break; } ButtonEvent.UnLock("gacha_result_initalize"); this.m_FinishedBonusEffect = true; FlowNode_GameObject.ActivateOutputLinks((Component)this, 70); break; } FlowNode_GameObject.ActivateOutputLinks((Component)this, 70); break; case 71: if (GachaResultData.dropMails != null && GachaResultData.dropMails.Length > 0) { this.StartCoroutine(this.ShowBonus(false)); break; } FlowNode_GameObject.ActivateOutputLinks((Component)this, 70); break; case 81: FlowNode_Variable.Set("REDRAW_GACHA_PENDING", "0"); GlobalEvent.Invoke("ENABLE_HOME_BUTTON", (object)this); FlowNode_GameObject.ActivateOutputLinks((Component)this, 82); break; case 90: this.RefreshButtonInteractable(true); break; case 91: this.RefreshButtonInteractable(false); break; } } }