public void Trigger(uint trigger, GameObject bridge) { if (trigger == TRIGGER_A && bridge == bridgeB) return; if (trigger == TRIGGER_B && bridge == bridgeA) return; _transitioningBridge = bridge; _sectionToDestroy = currentSection; if (trigger == TRIGGER_A) { //at the end of the game if(IndexOf(currentStreamingSection) == _streamingSections.Length - 1) return; _newStreamingSection = _streamingSections[IndexOf(currentStreamingSection)+1]; currentSection = _newStreamingSection.CreateSection(); _newBridge = Instantiate(_newStreamingSection.bridgeA); Destroy (bridgeB); bridgeB = bridgeA; bridgeA = _newBridge; currentSection.transform.Rotate (currentSection.GetComponent<GameSection>().anchorB.transform.rotation.eulerAngles - bridgeB.GetComponent<SectionBridge>().anchorA.transform.rotation.eulerAngles); //bridgeA.transform.Rotate (bridgeA.GetComponent<SectionBridge>().anchorB.transform.rotation.eulerAngles - currentSection.GetComponent<GameSection>().anchorA.transform.rotation.eulerAngles); bridgeA.transform.Rotate (currentSection.GetComponent<GameSection>().anchorA.transform.rotation.eulerAngles - bridgeA.GetComponent<SectionBridge>().anchorB.transform.rotation.eulerAngles); offset = bridgeB.GetComponent<SectionBridge>().anchorA.transform.position - currentSection.GetComponent<GameSection>().anchorB.transform.position; bridgeOffset = offset + (currentSection.GetComponent<GameSection>().anchorA.transform.position - bridgeA.GetComponent<SectionBridge>().anchorB.transform.position); } else if (trigger == TRIGGER_B) { //at the beginning of the game if(IndexOf(currentStreamingSection) == 0) return; _newStreamingSection = _streamingSections[IndexOf(currentStreamingSection)-1]; currentSection = _newStreamingSection.CreateSection(); _newBridge = Instantiate(_newStreamingSection.bridgeB); Destroy (bridgeA); bridgeA = bridgeB; bridgeB = _newBridge; offset = bridgeA.GetComponent<SectionBridge>().anchorB.transform.position - currentSection.GetComponent<GameSection>().anchorA.transform.position; bridgeOffset = offset + (currentSection.GetComponent<GameSection>().anchorB.transform.position - bridgeB.GetComponent<SectionBridge>().anchorA.transform.position); } _hasLoadedLevel = true; _newBridge.transform.parent = _game.transform; currentSection.transform.parent = _game.transform; currentStreamingSection = _newStreamingSection; _currentGameSection = currentSection.GetComponent<GameSection>(); _game.respawnScene = currentStreamingSection.respawnScene; _game.BroadcastMessage("ClearSceneData"); }
protected override void OnQuery_MATCHING() { FixBit(); if (searchRequest.rarityBit == 0) { GameSection.ChangeEvent("NOT_RARITY", null); } else if (searchRequest.elementBit == 0) { GameSection.ChangeEvent("NOT_ELEMENT", null); } else { base.OnQuery_MATCHING(); } }
protected override void SendRandomMatching() { GameSection.SetEventData(new object[1] { false }); GameSection.StayEvent(); MonoBehaviourSingleton <PartyManager> .I.SendRushSearchRandomMatching(delegate(bool is_success, Error err) { if (!is_success) { OnNotFoundMatchingParty(); } GameSection.ResumeEvent(true, null); }); }
protected override void Send() { SmithManager.SmithGrowData smithData = MonoBehaviourSingleton<SmithManager>.I.GetSmithData<SmithManager.SmithGrowData>(); if (smithData == null) { GameSection.StopEvent(); } else { EquipItemInfo selectEquipData = smithData.selectEquipData; if (selectEquipData == null) { GameSection.StopEvent(); } else { SmithManager.ResultData result_data = new SmithManager.ResultData(); result_data.beforeRarity = (int)selectEquipData.tableData.rarity; result_data.beforeLevel = selectEquipData.level; result_data.beforeMaxLevel = selectEquipData.tableData.maxLv; result_data.beforeExceedCnt = selectEquipData.exceed; result_data.beforeAtk = selectEquipData.atk; result_data.beforeDef = selectEquipData.def; result_data.beforeHp = selectEquipData.hp; result_data.beforeElemAtk = selectEquipData.elemAtk; result_data.beforeElemDef = selectEquipData.elemDef; GameSection.SetEventData(result_data); isNotifySelfUpdate = true; GameSection.StayEvent(); MonoBehaviourSingleton<SmithManager>.I.SendGrowEquipItem(selectEquipData.uniqueID, aimLv, delegate(Error err, EquipItemInfo grow_item) { if (err == Error.None) { aimLv = grow_item.level + 1; result_data.itemData = grow_item; MonoBehaviourSingleton<UIAnnounceBand>.I.isWait = true; GameSection.ResumeEvent(true, null); } else { isNotifySelfUpdate = false; GameSection.ResumeEvent(false, null); } }); } } }
public void OnQuery_SELECT_DELIVERY() { DeliveryDataAndUId dataAndUId = (DeliveryDataAndUId)GameSection.GetEventData(); DeliveryTable.DeliveryData data = dataAndUId.data; int id = (int)dataAndUId.data.id; bool is_enough_material = MonoBehaviourSingleton <DeliveryManager> .I.IsCompletableDelivery(id); if (!is_enough_material) { GameSection.SetEventData(new object[4] { id, null, false, mapData }); } else { bool flag = FieldManager.IsValidInGame(); bool flag2 = data.clearEventID != 0; if (flag) { if (data.IsInvalidClearIngame() || flag2) { GameSection.ChangeEvent("DELIVERY_ITEM_COMPLETE", null); } else { GameSection.StayEvent(); MonoBehaviourSingleton <CoopManager> .I.coopStage.fieldRewardPool.SendFieldDrop(delegate(bool b) { if (b) { SendDeliveryComplete(data, dataAndUId.uId, is_enough_material); } }); } } else { GameSection.StayEvent(); SendDeliveryComplete(data, dataAndUId.uId, is_enough_material); } } }
private void OnBuyMaterial(ShopReceiver.PaymentPurchaseData purchaseData) { if (purchaseData != null) { isPurchase = false; SendRequestCurrentPresentAndShopList(delegate { //IL_0011: Unknown result type (might be due to invalid IL or missing references) GameSection.ChangeStayEvent("BUY_SUCCESS", null); this.StartCoroutine("DoReloadMarketData"); }); } if (isPurchase) { GameSection.ResumeEvent(false, null); } }
protected override void OnQuery_FOLLOW() { GameSection.SetEventData(new object[1] { charaInfo.name }); List <int> list = new List <int>(); list.Add(charaInfo.userId); SendFollow(list, delegate(bool is_success) { if (is_success) { MonoBehaviourSingleton <FriendManager> .I.SetFollowToHomeCharaInfo(charaInfo.userId, true); } }); }
private void OnQuery_RECEIVE_REWARD() { TaskData data = GameSection.GetEventData() as TaskData; if (data != null) { GameSection.StayEvent(); TaskCompleteModel.RequestSendForm requestSendForm = new TaskCompleteModel.RequestSendForm(); requestSendForm.uId = data.info.taskId; Protocol.Send <TaskCompleteModel.RequestSendForm, TaskCompleteModel>(TaskCompleteModel.URL, requestSendForm, delegate { taskDataLists[0].Remove(data); UpdateUI(); GameSection.ResumeEvent(true, null); }, string.Empty); } }
private void OnQuery_GROW() { SkillItemInfo skillItemInfo = itemData as SkillItemInfo; if (skillItemInfo == null) { GameSection.StopEvent(); } else { GameSection.SetEventData(new object[2] { skillItemInfo, null }); } }
private void OnQuery_VISUAL_DETAIL() { int num = (int)GameSection.GetEventData(); if (visualEquip.visualItem.Length > num && visualEquip.visualItem[num] != null) { visualDetailEquip = visualEquip.visualItem[num]; visualDetailItemIndex = num; GameSection.ChangeEvent("DETAIL", null); GameSection.SetEventData(new object[3] { ItemDetailEquip.CURRENT_SECTION.STATUS_TOP, visualEquip.visualItem[num], equipSetNo }); } }
private void OnQuery_SEND_STAMP() { int num = 1; object eventData = GameSection.GetEventData(); if (eventData != null) { num = (int)eventData; } string message = "[STAMP]" + num.ToString(); GameSection.StayEvent(); MonoBehaviourSingleton <FriendManager> .I.SendFriendMessage(MonoBehaviourSingleton <FriendManager> .I.talkUser.userId, message, delegate(bool is_success) { GameSection.ResumeEvent(is_success, null); }); }
protected virtual void OnQuery_SKILL_LIST() { object[] array = new object[5] { ItemDetailEquip.CURRENT_SECTION.QUEST_RESULT, GetEquipSetAttachSkillListData(data.equipSet), true, data.sex, data.faceId }; GameSection.SetEventData(new object[3] { array, false, false }); }
protected override void OnQuery_TRY_ON() { selectInventoryIndex = (int)GameSection.GetEventData(); if (selectInventoryIndex < 0) { EquipItem = null; } else if (localInventoryEquipData != null) { EquipItem = (localInventoryEquipData[selectInventoryIndex].GetItemData() as EquipItemInfo); } if (MonoBehaviourSingleton <StatusStageManager> .IsValid()) { MonoBehaviourSingleton <StatusStageManager> .I.SetEquipInfo(EquipItem); } base.OnQuery_TRY_ON(); }
public override void Initialize() { EquipItemInfo equippingItem = MonoBehaviourSingleton <StatusManager> .I.GetEquippingItem(); selectEquipSetData = (GameSection.GetEventData() as LocalEquipSetData); EquipItem = equippingItem; if (equippingItem == null) { GameSection.SetEventData(-1); SelectingInventoryFirst(); } else { selectInventoryIndex = GetSelectItemIndex(); } base.Initialize(); }
public void OnQuery_ItemDetailLithographSellIncludeRareConfirm_YES() { List <string> list = new List <string>(); List <int> list2 = new List <int>(); list.Add(item.GetUniqID().ToString()); list2.Add(num); if (num >= item.GetNum()) { GameSection.ChangeEvent("CLOSE_DETAIL", null); } GameSection.StayEvent(); MonoBehaviourSingleton <ItemExchangeManager> .I.SendInventorySellItem(list, list2, delegate(bool is_success) { GameSection.ResumeEvent(is_success, null); }); }
protected static void ResumeEvent(bool is_resume, object userData = null) { if (is_resume) { GameSceneEvent.Resume(userData); } else { GameSceneEvent.Cancel(); GameSection currentSection = MonoBehaviourSingleton <GameSceneManager> .I.GetCurrentSection(); if (currentSection != null && currentSection.isClose) { currentSection.Open(UITransition.TYPE.OPEN); } } }
protected override IEnumerator DoInitialize() { bool wait = true; CreateEquipItemTable.CreateEquipItemData createEquipItemTable = GameSection.GetEventData() as CreateEquipItemTable.CreateEquipItemData; MonoBehaviourSingleton <SmithManager> .I.SendGetAbilityListPreGenerate(createEquipItemTable.id, delegate(Error error, List <SmithGetAbilityListForCreateModel.Param> list) { ((_003CDoInitialize_003Ec__IteratorC5) /*Error near IL_0048: stateMachine*/)._003Cwait_003E__0 = false; ((_003CDoInitialize_003Ec__IteratorC5) /*Error near IL_0048: stateMachine*/)._003C_003Ef__this.SetAbilities(list); }); while (wait) { yield return((object)null); } InitializeBase(); }
private void OnQuery_JOIN() { GameSection.SetEventData($"Welcome to {_info.clanName}!"); GameSection.StayEvent(); MonoBehaviourSingleton <GuildManager> .I.SendRequestJoin(_clanId, -1, delegate(bool isSuccess, Error error) { GuildInfoDialog guildInfoDialog = this; DoWaitProtocolBusyFinish(delegate { if (!GuildManager.IsValidInGuild()) { GameSection.ChangeStayEvent("REQUEST", null); } GameSection.ResumeEvent(isSuccess, null); }); }); }
private void ProcessBackKey() { if (MonoBehaviourSingleton <GameSceneManager> .IsValid() && MonoBehaviourSingleton <GameSceneManager> .I.IsBackKeyEventExecutionPossible()) { if (Object.op_Implicit(mainChat) && mainChat.IsOpeningWindow()) { mainChat.OnPressBackKey(); } else { GameSection currentSection = MonoBehaviourSingleton <GameSceneManager> .I.GetCurrentSection(); if (currentSection != null && currentSection.collectUI != null) { if (currentSection.useOnPressBackKey) { currentSection.OnPressBackKey(); } else { string b = "[BACK]"; if (!string.IsNullOrEmpty(currentSection.overrideBackKeyEvent)) { b = currentSection.overrideBackKeyEvent; } UIGameSceneEventSender[] componentsInChildren = currentSection.collectUI.GetComponentsInChildren <UIGameSceneEventSender>(); int num = 0; int num2 = componentsInChildren.Length; while (true) { if (num >= num2) { return; } if (componentsInChildren[num].eventName == b) { break; } num++; } componentsInChildren[num]._SendEvent(); } } } } }
private void OnQuery_RANKING() { Network.EventData eventData = GameSection.GetEventData() as Network.EventData; if (eventData == null) { EventData[] autoEvents = new EventData[2] { new EventData("RANK", null), new EventData("LAST", new object[2] { "null", -1 }) }; MonoBehaviourSingleton <GameSceneManager> .I.SetAutoEvents(autoEvents); } }
protected virtual void OnQuery_FOLLOW() { GameSection.SetEventData(new object[1] { data.name }); List <int> list = new List <int>(); list.Add(data.userId); SendFollow(list, delegate(bool is_success) { if (is_success) { dataFollowing = !dataFollowing; } }); }
private void OnBuy(PointShopItem item, int num) { string boughtMessage = PointShopManager.GetBoughtMessage(item, num); GameSection.SetEventData(boughtMessage); GameSection.StayEvent(); PointShop pointShop = this.pointShop.First((PointShop x) => x.items.Contains(item)); MonoBehaviourSingleton <UserInfoManager> .I.PointShopManager.SendPointShopBuy(item, pointShop, num, delegate(bool isSuccess) { if (isSuccess) { UpdateTab(); } GameSection.ResumeEvent(isSuccess, null); }); }
protected virtual void OnQuery_STATUS() { EquipSetInfo equipSetInfo = MonoBehaviourSingleton <StatusManager> .I.CreateEquipSetData(data.equipSet); object[] array = new object[3] { equipSetInfo, MonoBehaviourSingleton <StatusManager> .I.GetEquipSetAbility(equipSetInfo, null), new EquipSetDetailStatusAndAbilityTable.BaseStatus(data.atk, data.def, data.hp, data.equipSet) }; GameSection.SetEventData(new object[3] { array, false, false }); }
public override void Initialize() { selectIndex = -1; object[] array = GameSection.GetEventData() as object[]; callSection = (ItemDetailEquip.CURRENT_SECTION)(int) array[0]; eventData = array[1]; sex = -1; if (array.Length > 2) { sex = (int)array[2]; } if (sex == -1) { sex = MonoBehaviourSingleton <UserInfoManager> .I.userStatus.sex; } base.Initialize(); }
private void OnQuery_SKILL_LIST() { tweenTarget = null; if (MonoBehaviourSingleton <UserInfoManager> .I.CheckTutorialBit(TUTORIAL_MENU_BIT.GACHA2) && MonoBehaviourSingleton <UserInfoManager> .I.CheckTutorialBit(TUTORIAL_MENU_BIT.SKILL_EQUIP)) { goto IL_002f; } goto IL_002f; IL_002f: GameSection.SetEventData(new object[4] { ItemDetailEquip.CURRENT_SECTION.STATUS_TOP, GetLocalEquipSetAttachSkillListData(equipSetNo), false, MonoBehaviourSingleton <UserInfoManager> .I.userStatus.sex }); }
public override void Initialize() { object[] array = GameSection.GetEventData() as object[]; isRegion = (bool)array[0]; isOpenedHard = (bool)array[1]; enableHardLevel = ((int)MonoBehaviourSingleton <UserInfoManager> .I.userStatus.level >= 150); bool flag = enableHardLevel; if (flag && isRegion) { flag = isOpenedHard; } SetActive((Enum)UI.BTN_HARD, flag); SetActive((Enum)UI.BTN_HARD_GRAY, !flag); SetText(); base.Initialize(); }
public override void Initialize() { //IL_005a: Unknown result type (might be due to invalid IL or missing references) itemNum = ColmunNum * ColmunNum; centerIndex = itemNum / 2; object eventData = GameSection.GetEventData(); if (eventData is bool) { isComeFromAutoEvent = (bool)eventData; } isFirstUpdate = true; LoadingQueue load_queue = new LoadingQueue(this); CacheAudio(load_queue); this.StartCoroutine(DoInitialize()); }
public void OnQuery_ProfileChangeDegreeConfirmDialog_YES() { GameSection.StayEvent(); DegreeEquipModel.RequestSendForm requestSendForm = new DegreeEquipModel.RequestSendForm(); requestSendForm.degid0 = currentDegrees[0].ToString(); requestSendForm.degid1 = currentDegrees[1].ToString(); requestSendForm.degid2 = currentDegrees[2].ToString(); requestSendForm.degid3 = currentDegrees[3].ToString(); Protocol.Send(DegreeEquipModel.URL, requestSendForm, delegate(DegreeEquipModel x) { GameSection.ResumeEvent(x.Error == Error.None, null); if (x.Error == Error.None) { RequestEvent("[BACK]", null); } }, string.Empty); }
public override void Initialize() { //IL_007d: Unknown result type (might be due to invalid IL or missing references) object[] array = (object[])GameSection.GetEventData(); friendCharaInfo = (array[0] as FriendCharaInfo); data = (array[0] as CharaInfo); eventData = (array[1] as Network.EventData); if (friendCharaInfo != null) { dataFollower = friendCharaInfo.follower; dataFollowing = friendCharaInfo.following; } nowSectionName = MonoBehaviourSingleton <GameSceneManager> .I.GetCurrentSectionName(); isFollowerList = Object.op_Implicit(Object.FindObjectOfType(typeof(FriendFollowerList))); InitializeBase(); }
protected virtual void OnQuery_START() { SmithManager.ERR_SMITH_SEND eRR_SMITH_SEND = MonoBehaviourSingleton <SmithManager> .I.CheckGrowEquipItem(GetEquipData()); if (eRR_SMITH_SEND != 0) { GameSection.ChangeEvent(eRR_SMITH_SEND.ToString(), null); } else { isDialogEventYES = false; GameSection.SetEventData(new object[1] { GetEquipItemName() }); } }
public override void Initialize() { //IL_005d: Unknown result type (might be due to invalid IL or missing references) selectedQuestInfoData = (GameSection.GetEventData() as QuestInfoData); if (selectedQuestInfoData != null) { if (IsFromShadow()) { selectedQuestNum = MonoBehaviourSingleton <PartyManager> .I.challengeInfo.num; } else { selectedQuestNum = selectedQuestInfoData.questData.num; } } this.StartCoroutine(DoInitialize()); }
public PcBuffer( GameSection[] sections ) { _data = sections; }