protected override void OnResourceLoaded() { var parent = MogoWorld.m_uiManager.MogoMainUIPanel.FindChild("BattleUI/Right"); SyncCreateUIInstanceWithRootTransform(Resources[0], parent); m_myTransform.localPosition = new Vector3(-70, 100, 0); var btnXuQi = FindComponent <MogoUIBtn>("BtnXuQi"); btnXuQi.SetText(LanguageData.GetContent(100)); var pressedMgr = btnXuQi.gameObject.AddComponent <BtnPressedMgr>(); pressedMgr.ActionPressed = OnPressXuQi; pressedMgr.ActionUnPressed = OnUnPressXuQi; m_btnFly = FindComponent <MogoUIBtn>("BtnFly"); m_btnFly.ClickAction = OnBtnFly; m_btnJump = FindComponent <MogoUIBtn>("BtnJump"); m_btnJump.ClickAction = OnBtnJump; m_btnJump.SetText(LanguageData.GetContent(105)); m_goKeyCodeXuqi = FindTransform("KeyCodeXuqi").gameObject; m_goKeyCodeXuqi.transform.FindChild("LblKeyCodeXuqi").GetComponent <UILabel>().text = LanguageData.GetContent(151); m_goKeyCodeFlyState = FindTransform("KeyCodeFly").gameObject; m_goKeyCodeFlyState.transform.FindChild("LblKeyCodeFly").GetComponent <UILabel>().text = LanguageData.GetContent(152); m_goKeyCodeJump = FindTransform("KeyCodeJump").gameObject; m_goKeyCodeJump.transform.FindChild("LblKeyCodeJump").GetComponent <UILabel>().text = LanguageData.GetContent(154); SetKeyCodeActive(); AddListeners(); }
/// <summary> /// 性别 /// </summary> public string GetSexString(TaskManager.DialogueRelationship relationship) { switch (relationship) { case TaskManager.DialogueRelationship.YoungerToOlder: switch (vocation) { case Vocation.Warrior: case Vocation.Archer: return(LanguageData.GetContent(150006)); case Vocation.Mage: case Vocation.Assassin: return(LanguageData.GetContent(150007)); default: return(""); } case TaskManager.DialogueRelationship.OlderToYounger: return(""); case TaskManager.DialogueRelationship.You: return(""); default: return(""); } }
public void DecomposeResp(byte index, byte errorId, byte hasJewel) { ShowErrorInfo(errorId); if (errorId != 0) { return; } DecomposeUILogicManager.Instance.ChooseDecomposeEquipType = DecomposeUILogicManager.Instance.ChooseDecomposeEquipType; //if (m_checkDic.ContainsKey(index)) //{ // m_checkDic.Remove(index); //} EquipTipManager.Instance.CloseEquipTip(); if (hasJewel > 0) { if (m_isDecomposeInDecUI) { DecomposeUIViewManager.Instance.ShowDecomposeJewlTip(); } else { MogoMsgBox.Instance.ShowMsgBox(LanguageData.GetContent(1088)); } } }
public void SetSkillBall(int index) { var data = new List <SpriteSkillPieceData>(); data.Add(new SpriteSkillPieceData() { icon = "", name = "", isAwake = false }); foreach (var item in ElfNodeData.dataMap.OrderByKey().Where(x => x.Key.ToString().StartsWith(start))) { if (item.Key > Int32.Parse(start) * 100 + index) { data.Add(new SpriteSkillPieceData() { icon = IconData.dataMap.Get(item.Value.iconId).path, name = LanguageData.GetContent(item.Value.nameCode), isAwake = false }); } else { data.Add(new SpriteSkillPieceData() { icon = IconData.dataMap.Get(item.Value.iconId).path, name = LanguageData.GetContent(item.Value.nameCode), isAwake = true }); } } SpriteUIViewManager.Instance.SetSpriteSkillDetailUIPieceData(data); }
public void OnOpenUI(List <int> FulfillAreaList) { var skillList = new List <SpriteSkillData>(ElfSkillData.dataMap.Count); foreach (var item in ElfAreaLimitData.dataMap.OrderByKey()) { if (FulfillAreaList.Contains(item.Value.areaId)) { //填满了 skillList.Add(new SpriteSkillData() { ID = item.Key, name = LanguageData.GetContent(item.Value.nameCode), unlockLevel = item.Value.limitLevel, hasFilled = true }); } else { //填满了 skillList.Add(new SpriteSkillData() { ID = item.Key, name = LanguageData.GetContent(item.Value.nameCode), unlockLevel = item.Value.limitLevel, hasFilled = false }); } } SpriteUIViewManager.Instance.SetSpriteSkillListData(skillList); }
void Awake() { m_instance = this; m_myTransform = transform; FillFullNameData(m_myTransform); m_goOccupyTowerUIBtnJoin = FindTransform("OccupyTowerUIBtnJoin").gameObject; m_spOccupyTowerUIBtnJoinBGUp = FindTransform("OccupyTowerUIBtnJoinBGUp").GetComponentsInChildren <UISprite>(true)[0]; m_lblOccupyTowerUIQueueNum = FindTransform("OccupyTowerUIQueueNum").GetComponentsInChildren <UILabel>(true)[0]; m_lblOccupyTowerUIScoreTitle = FindTransform("OccupyTowerUIScoreTitle").GetComponentsInChildren <UILabel>(true)[0]; m_lblOccupyTowerUIScoreNum = FindTransform("OccupyTowerUIScoreNum").GetComponentsInChildren <UILabel>(true)[0]; // 匹配UI m_goMatchUI = FindTransform("OccupyTowerUIMatchUI").gameObject; m_lblMatchUICountDown = FindTransform("OccupyTowerUIMatchUICountDown").GetComponentsInChildren <UILabel>(true)[0]; m_lblMatchUIText = FindTransform("OccupyTowerUIMatchUIText").GetComponentsInChildren <UILabel>(true)[0]; m_goMatchUIOKBtn = FindTransform("OccupyTowerUIMatchUIOKBtn").gameObject; m_goMatchUICancelBtn = FindTransform("OccupyTowerUIMatchUICancelBtn").gameObject; m_lblMatchUICancelBtnText = FindTransform("OccupyTowerUIMatchUICancelBtnText").GetComponentsInChildren <UILabel>(true)[0]; m_lblMatchUIOKBtnText = FindTransform("OccupyTowerUIMatchUIOKBtnText").GetComponentsInChildren <UILabel>(true)[0]; // I18N FindTransform("OccupyTowerUITitleName").GetComponentsInChildren <UILabel>(true)[0].text = LanguageData.GetContent(24034); FindTransform("OccupyTowerUIRuleTitle").GetComponentsInChildren <UILabel>(true)[0].text = string.Concat(LanguageData.GetContent(24034), LanguageData.GetContent(48912)); m_lblMatchUIText.text = LanguageData.GetContent(48908); m_lblOccupyTowerUIScoreTitle.text = LanguageData.GetContent(48905); SetOccupyTowerUIRule(); SetIsMatchNow(false); Initialize(); }
public void OnDoorShow() { Debug.Log("OnDoorShow"); if (m_hasAnyDoor) { //todo ��������ˢ�� //m_isShowingDoorList = true; MogoWorld.thePlayer.RpcCall("OblivionGateReq", 2, 0, 0); //AddTestData(); //OnDoorShowDataResp(m_doorList); } else { MogoUIManager.Instance.ShowMogoDoorOfBuryUI(() => { if (DoorOfBuryUIViewManager.Instance != null) { DoorOfBuryUIViewManager.Instance.SetGridNum(0); DoorOfBuryUIViewManager.Instance.SetDoorTitle(LanguageData.GetContent(47111)); // "����֮��" DoorOfBuryUIViewManager.Instance.ClearDoorCD(); } }); //MogoMsgBox.Instance.ShowFloatingText(LanguageData.GetContent(1001002)); } }
public void OnFriendRecvAllBlessResp(int energy, LuaTable luaTable, int msg) { Debug.Log("OnFriendRecvAllBlessResp:" + msg); if (msg == ERROR_FRIEND_SUCCESS) { List <TDBID> obj; if (Utils.ParseLuaTable(luaTable, out obj)) { foreach (TDBID id in obj) { FriendMessageGridData fd = GetFriendInfo(id); fd.isWishByFriend = false; IsfriendListDirty = true; } } int msgid = ContentDefine.Friend.TEXT_RECV_ALL_BLESS_SUCCEED; if (LanguageData.dataMap.ContainsKey(msgid)) { string s = LanguageData.GetContent(msgid, energy);//dataMap[msgid].Format(energy); ShowText(2, s); } IsfriendListDirty = true; SocietyUIViewManager.Instance.RefreshFriendList(); SocietyUIViewManager.Instance.AddOneKeyGetBlessListUnit(obj); return; } OnFriendErrorResp((byte)msg); }
void Awake() { m_myTransform = transform; m_spFriendHead = m_myTransform.FindChild("FriendHeadImage").GetComponentsInChildren <UISprite>(true)[0]; m_lblFriendLevel = m_myTransform.FindChild("FriendLevel").GetComponentsInChildren <UILabel>(true)[0]; m_lblFightingPower = m_myTransform.FindChild("FightingPower").GetComponentsInChildren <UILabel>(true)[0]; m_lblFriendName = m_myTransform.FindChild("FriendName").GetComponentsInChildren <UILabel>(true)[0]; m_spLeaveMessageSign = m_myTransform.FindChild("LeaveMessageSign").GetComponentsInChildren <UISprite>(true)[0]; m_spWishStrenthSign = m_myTransform.FindChild("WishStrenthSign").GetComponentsInChildren <UISprite>(true)[0]; m_lblFriendHasWishTip = m_myTransform.FindChild("FriendHasWishTip").GetComponentsInChildren <UILabel>(true)[0]; for (int i = 0; i < 6; ++i) { m_ArrFriendDegree[i] = m_myTransform.FindChild("FriendDegreeList/Degree" + i).GetComponentsInChildren <UISprite>(true)[0]; if (i == 6) { m_bAllFriendDegreeLoaded = true; } } m_spLeaveMessageSign.GetComponentsInChildren <MogoButton>(true)[0].clickHandler += OnLeaveMessageSignUp; m_spWishStrenthSign.GetComponentsInChildren <MogoButton>(true)[0].clickHandler += OnWishStrenthSignUp; // ChineseData m_lblFriendHasWishTip.text = LanguageData.GetContent(ContentDefine.Friend.WISH_BUTTON_WISHED); }
public void TruelyConfirm(string text, Action <bool> Callback, string okText = "OK", string cancelText = "CANCEL", float countDownTime = -1, ButtonBgType okBgType = ButtonBgType.Blue, ButtonBgType cancelBgType = ButtonBgType.Brown) { if (okText.Equals("OK")) { okText = LanguageData.GetContent(25561); } if (cancelText.Equals("CANCEL")) { cancelText = LanguageData.GetContent(25562); } m_goOKCancelBox.SetBoxText(text); m_goOKCancelBox.SetOKBtnText(okText); m_goOKCancelBox.SetCancelBtnText(cancelText); SetButtonBg(m_goOKCancelBox.m_spOKBgUp, m_goOKCancelBox.m_spOKBgDown, okBgType); SetButtonBg(m_goOKCancelBox.m_spCancelBgUp, m_goOKCancelBox.m_spCancelBgDown, cancelBgType); m_goOKCancelBox.SetCountDown(countDownTime); m_goOKCancelBox.gameObject.SetActive(true); m_goOKCancelBox.SetCallback(Callback); //m_goModelController.gameObject.SetActive(true); m_goOKCancelBox.ShowAsOKCancel(); //Debug.Log("TruelyConfirm"); }
private string GetName(int id) { if (ItemEquipmentData.dataMap.ContainsKey(id)) { return(LanguageData.dataMap.Get(ItemEquipmentData.dataMap.Get(id).name).content); } if (ItemJewelData.dataMap.ContainsKey(id)) { return(LanguageData.dataMap.Get(ItemJewelData.dataMap.Get(id).name).content); } if (ItemMaterialData.dataMap.ContainsKey(id)) { return(LanguageData.dataMap.Get(ItemMaterialData.dataMap.Get(id).name).content); } if (WingData.dataMap.ContainsKey(id)) { marketItemType = MarkItemType.WingItem; return(LanguageData.GetContent(WingData.dataMap.Get(id).name)); } //if (ItemOthersData.dataMap.ContainsKey(id)) //{ // return LanguageData.dataMap.Get(ItemOthersData.dataMap.Get(id).name).content; //} //if (ItemPearlData.dataMap.ContainsKey(id)) //{ // return LanguageData.dataMap.Get(ItemPearlData.dataMap.Get(id).name).content; //} return("noitemname"); }
void Update() { if (m_bShowWaitingTip) { m_fCurrentTime += Time.deltaTime; if (m_fCurrentTime >= MAXWAITINGTIME) { MogoMsgBox.Instance.ShowFloatingText(LanguageData.GetContent(605)); if (MogoWorld.thePlayer.sceneId == MogoWorld.globalSetting.homeScene) { MogoUIManager.Instance.ShowMogoNormalMainUI(); } else { MogoUIManager.Instance.ShowMogoBattleMainUI(); } ShowWaitingTip(false); m_fCurrentTime = 0.0f; } } else { m_fCurrentTime = 0.0f; } }
/// <summary> /// 设置好友信息 /// </summary> /// <param name="friendName"></param> public void SetFriendState(int state, string friendName = "") { switch ((FriendState)state) { case FriendState.NoFriend: { m_goInstancePassUIFriend.SetActive(false); m_lblInstancePassUIFriend.gameObject.SetActive(false); ShowInstancePassUIMakeFriendBtn(false); } break; case FriendState.IsFriend: { m_goInstancePassUIFriend.SetActive(true); m_lblInstancePassUIFriend.gameObject.SetActive(true); ShowInstancePassUIMakeFriendBtn(true); m_lblInstancePassUIMakeFriend.text = LanguageData.GetContent(46989); SetFriend(friendName); } break; case FriendState.MakeFriend: { m_goInstancePassUIFriend.SetActive(true); m_lblInstancePassUIFriend.gameObject.SetActive(true); ShowInstancePassUIMakeFriendBtn(true); m_lblInstancePassUIMakeFriend.text = LanguageData.GetContent(46990); SetFriend(friendName); } break; default: break; } }
public void TruelyInfo(string text, string okText = "OK", string cancelText = "CANCEL", float countDownTime = -1, ButtonBgType okBgType = ButtonBgType.Blue, ButtonBgType cancelBgType = ButtonBgType.Brown, Action callback = null) { if (okText.Equals("OK")) { okText = LanguageData.GetContent(25561); } if (cancelText.Equals("CANCEL")) { cancelText = LanguageData.GetContent(25562); } m_goOKCancelBox.SetBoxText(text); m_goOKCancelBox.SetOKBtnText(okText); m_goOKCancelBox.SetCancelBtnText(cancelText); SetButtonBg(m_goOKCancelBox.m_spOKBgUp, m_goOKCancelBox.m_spOKBgDown, okBgType); SetButtonBg(m_goOKCancelBox.m_spCancelBgUp, m_goOKCancelBox.m_spCancelBgDown, cancelBgType); m_goOKCancelBox.SetCountDown(countDownTime); m_goOKCancelBox.ShowAsOK(); m_goOKCancelBox.gameObject.SetActive(true); m_goOKCancelBox.SetCallback((rst) => { ConfirmHide(); if (callback != null) { callback(); } }); //m_goModelController.gameObject.SetActive(true); Mogo.Util.LoggerHelper.Debug("TruleyInfo"); }
/// <summary> /// /// </summary> /// <param name="errorId"> /// ERR_DRAGON_GOLDED = 9, --已是金色飞龙 /// ERR_DRAGON_COST_LIMIT = 10, --消耗不足 /// ERR_DRAGON_FRESH_FAIL = 20, --升级失败 /// </param> /// <param name="quality"></param> public void OnUpgradeDragonResp(byte errorId, byte quality) { Debug.Log("OnUpgradeDragonResp:" + errorId); if (errorId == 0) { m_currentData.dragonQuality = quality; //刷新选龙界面 MogoMsgBox.Instance.ShowFloatingText(LanguageData.GetContent(26314)); } else { switch (errorId) { case 9: MogoMsgBox.Instance.ShowFloatingText(LanguageData.GetContent(26317)); break; case 10: ShowLackOfDiamondTip(); break; case 20: MogoMsgBox.Instance.ShowFloatingText(LanguageData.GetContent(26313)); break; } } SetupChooseDragonView(); }
protected override void OnResourceLoaded() { var parent = MogoWorld.m_uiManager.MogoMainUIPanel.FindChild("BattleUI/Center"); SyncCreateUIInstanceWithRootTransform(Resources[0], parent); m_myTransform.localPosition = new Vector3(0, 0, 0); m_myTransform.localScale = new Vector3(1.0f, 1.0f, 1f); MogoUIBtn _btn = FindTransform("BtnOk").GetComponent <MogoUIBtn>(); _btn.SetText(LanguageData.GetContent(3)); _btn.ClickAction = OnCloseUI; //LoggerHelper.Error(LanguageData.GetContent(3)); ScoreList = new List <List <UILabel> >(); for (int i = 0; i < 2; i++) { ScoreList.Add(new List <UILabel>()); for (int j = 0; j < 5; j++) { ScoreList[i].Add(FindTransform(string.Concat("Score", i, "Text", j)).GetComponent <UILabel>()); FindTransform(string.Concat("ScoreName", i, "Text", j)).GetComponent <UILabel>().text = LanguageData.GetContent(173 + j); } } ShowScore(); }
/// <summary> /// ERR_DRAGON_OK = 0, ///ERR_DRAGON_ATKBUY_LIMIT = 8, --袭击购买次数达到上限 ///ERR_DRAGON_COST_LIMIT = 10, --消耗不足 ///ERR_DRAGON_DEDUCT_WRONG = 11, --扣除失败 ///ERR_DRAGON_CFG_ERR = 12, --配置错误 /// </summary> /// <param name="errorId"></param> public void BuyAtkTimesResp(byte errorId) { Debug.Log("BuyAtktimesResp:" + errorId); if (errorId == 0) { m_currentData.currentHitTime++; DragonMatchUIViewManager.Instance.SetHitTimes(String.Concat(m_currentData.currentHitTime, "/", DragonBaseData.dataMap[1].convoyAttackedTimes)); } else { string msg = string.Empty; switch (errorId) { case 8: msg = LanguageData.GetContent(26330); break; case 10: ShowLackOfDiamondTip(); break; case 11: msg = LanguageData.GetContent(26332); break; case 12: msg = LanguageData.GetContent(26333); break; } MogoMsgBox.Instance.ShowFloatingText(msg); } }
private TipViewData GetTipViewDataByEquipToDecompose(ItemEquipment equip) { TipViewData viewData = new TipViewData() { priority = TIP_TYPE_ENHANCE, itemId = equip.templateId, tipText = LanguageData.GetContent(3028) + "\n" + LanguageData.GetContent(3029), btnName = LanguageData.GetContent(3030), btnAction = () => { //TimerHeap.DelTimer(timerId); TipUIManager.Instance.HideAll(TIP_TYPE_ENHANCE); ItemParent temp = InventoryManager.Instance.GetItemByItemID(equip.templateId); if (temp == null) { MogoMsgBox.Instance.ShowFloatingText(LanguageData.GetContent(472)); } else { MogoWorld.thePlayer.StopMove(); MogoUIManager.Instance.SwitchDecomposeUI(); } } }; return(viewData); }
private void OnEnterDoor() { Debug.Log("OnEnterDoor"); //if (CD > 0) //{ // MogoMsgBox.Instance.ShowMsgBox("CD��!"); // return; //} //if (m_selectDoor.isWin) //{ // MogoMsgBox.Instance.ShowMsgBox("ս����ʤ����"); // return; //} //if (m_selectDoor.isLose) //{ // MogoMsgBox.Instance.ShowMsgBox("ս����ʧ�ܣ�"); // return; //} //todo ֪ͨ������ if (m_currentCopyId < 0) { MogoMsgBox.Instance.ShowFloatingText(LanguageData.GetContent(47109));// "��ѡ������֮��" } else { MogoWorld.thePlayer.RpcCall("OblivionGateReq", 1, m_currentCopyId, 0); } }
private TipViewData GetTipViewDataByEquip(ItemEquipment equip) { TipViewData viewData = new TipViewData() { priority = TIP_TYPE_EQUIP, itemId = equip.templateId, tipText = LanguageData.GetContent(3020) + "\n" + equip.name, btnName = LanguageData.GetContent(3021), btnAction = () => { //TimerHeap.DelTimer(timerId); TipUIManager.Instance.Hide(TIP_TYPE_EQUIP); ItemParent temp = InventoryManager.Instance.GetItemByItemID(equip.templateId); if (temp == null) { MogoMsgBox.Instance.ShowFloatingText(LanguageData.GetContent(472)); } else { MogoWorld.thePlayer.RpcCall("ExchangeEquipment", temp.id, (byte)temp.gridIndex); } } }; return(viewData); }
public void InitBattleCommunityUIShortCutMessage(MapType type) { if (!ChatListData.dataMap.ContainsKey((int)type)) { return; } List <int> chatList = ChatListData.dataMap.Get((int)type).chatList; if (chatList == null) { return; } List <string> chatString = new List <string>(); foreach (var chatMessageID in chatList) { chatString.Add(LanguageData.GetContent(chatMessageID)); } switch (type) { case MapType.TOWERDEFENCE: MainUIViewManager.Instance.CurChannel = ChannelId.TOWER_DEFENCE; break; case MapType.OCCUPY_TOWER: MainUIViewManager.Instance.CurChannel = ChannelId.OCCUPY_TOWER; break; } MainUIViewManager.Instance.ShowShortCutCommunityUI(true); MainUIViewManager.Instance.AddShortCutCommunityGrid(chatString); }
private void CheckBodyEnhance(int level) { int canEnhanceSlot = BodyEnhanceManager.Instance.GetCanEnhanceSlot(level); if (canEnhanceSlot <= 0) { return; } //uint timerId = TimerHeap.AddTimer(TIME_LENGTH, 0, () => { TipUIManager.Instance.Hide(TIP_TYPE_ENHANCE); }); TipViewData viewData = new TipViewData() { priority = TIP_TYPE_ENHANCE, icon = BodyIcon.icons[canEnhanceSlot - 1], btnName = LanguageData.GetContent(3027), tipText = LanguageData.GetContent(3025) + "\n" + LanguageData.GetContent(3026), btnAction = () => { InventoryManager.Instance.CurrentView = InventoryManager.View.BodyEnhanceView; //Debug.LogError("canEnhanceSlot:" + canEnhanceSlot); MogoUIManager.Instance.SwitchStrenthUI(() => { OnSwitchStrenthUIDone(canEnhanceSlot); });// } }; TipUIManager.Instance.AddTipViewData(viewData); }
public void RefreshLearnedSkill(Dictionary <int, int> data, uint equipSkill) { MogoWorld.thePlayer.ElfEquipSkillId = equipSkill; var LearnData = new List <SpriteLearnSkillData>(data.Count); var skillIDList = new List <int>(); foreach (var item in data) { if (item.Key != MogoWorld.thePlayer.ElfEquipSkillId) { skillIDList.Add(item.Key); LearnData.Add(new SpriteLearnSkillData() { name = LanguageData.GetContent(SkillData.dataMap.Get(item.Key).name), icon = IconData.dataMap.Get(SkillData.dataMap.Get(item.Key).icon).path, hasLearned = Convert.ToBoolean(item.Value), isEquipped = false }); } else { skillIDList.Add(item.Key); LearnData.Add(new SpriteLearnSkillData() { name = LanguageData.GetContent(SkillData.dataMap.Get(item.Key).name), icon = IconData.dataMap.Get(SkillData.dataMap.Get(item.Key).icon).path, hasLearned = Convert.ToBoolean(item.Value), isEquipped = true }); } } ElfSystem.Instance.PropSkillData = skillIDList; SpriteUIViewManager.Instance.SetListSpriteUILearnSkill(LearnData); SpriteUILogicManager.Instance.OnLearnSkillUISkillChoose(CurrentSkill); }
private void NewAddGiftTip(int level) { int gap = 5; if (level % gap != 0) { return; } TipViewData viewData = new TipViewData() { priority = TIP_TYPE_GIFT, itemId = 1100101, btnName = LanguageData.GetContent(3024), tipText = LanguageData.GetContent(3022) + "\n" + LanguageData.GetContent(3023, level), btnAction = () => { //TimerHeap.DelTimer(timerId); TipUIManager.Instance.HideAll(TIP_TYPE_GIFT); MogoUIManager.Instance.SwitchToMarket(MarketUITab.ItemTab); } }; TipUIManager.Instance.AddTipViewData(viewData); }
private void UpdateView() { int vocation = (int)MogoWorld.thePlayer.vocation; int weaponType = MogoWorld.thePlayer.GetEquipSubType(); List <int> l = vocationCfg[vocation]; if (clickedWeapon) { weaponType = l[weaponPos]; skills = (MogoWorld.thePlayer.skillManager as PlayerSkillManager).GetSkillMapping(l[weaponPos]); } SkillUIViewManager.Instance.SetWeapon0PageText(LanguageData.GetContent(l[2])); SkillUIViewManager.Instance.SetWeapon1PageText(LanguageData.GetContent(l[3])); List <int> skillList = new List <int>(); skillList.Add(skills.normalAttack); skillList.Add(skills.spellOne); skillList.Add(skills.spellTwo); skillList.Add(skills.spellThree); skillList.Add(skills.maxPowerupAttack); UpdateWeaponPage(weaponType); for (int i = 0; i < skillList.Count; i++) { UpdateSkillTree(skillList, i, vocation, weaponType); } UpdateSkillInfo(); }
public void AddMailHasJewelTip(TDBID mailGridId) { TipViewData viewData = new TipViewData() { priority = TIP_TYPE_MAIL_HAS_JEWEL, btnName = LanguageData.GetContent(3044), icon = IconData.dataMap.Get(118).path, tipText = LanguageData.GetContent(3043), existTime = 50000, btnAction = () => { MogoWorld.thePlayer.StopMove(); MogoUIManager.Instance.SwitchSocialUI(() => { TipUIManager.Instance.HideAll(TIP_TYPE_MAIL_HAS_JEWEL); if (SocietyUIViewManager.Instance) { SocietyUIViewManager.Instance.ChangeToMailTab(); EventDispatcher.TriggerEvent <TDBID>(SocietyUILogicManager.SocietyUIEvent.MAILGRIDUP, mailGridId); } }); } }; //加入viewData TipUIManager.Instance.AddTipViewData(viewData); }
private void OnCheckUp(int index) { if (!m_checkSet.Contains(index)) { m_checkSet.Add(index); } else { m_checkSet.Remove(index); } if (m_checkSet.Count > 10) { m_checkSet.Remove(index); MogoGlobleUIManager.Instance.Confirm(LanguageData.GetContent(1078), (rst) => { if (rst) { OnDecompose(); } MogoGlobleUIManager.Instance.ConfirmHide(); }, LanguageData.GetContent(1085), LanguageData.GetContent(1086)); return; } else { DecomposeUIViewManager.Instance.SetCheckGridUp(index, m_checkSet.Contains(index)); } }
/// <summary> /// ERR_DRAGON_NOATKED = 1, --袭击对手数据错误 /// ERR_DRAGON_MAX_ATKED_TIMES = 2, --对手已达最大被袭击次数 /// ERR_DRAGON_MAX_ATK_TIMES = 3, --已达最大袭击次数 /// ERR_DRAGON_ATK_CDLIMIT = 4, --袭击CD未结束 /// ERR_DRAGON_MAX_RVG = 5, --复仇已达最大次数 /// ERR_DRAGON_NOCONVOY = 6, --对手没有护送飞龙 /// </summary> /// <param name="errorId"></param> public void DragonAttackResp(byte errorId) { if (errorId == 0) { MogoUIManager.Instance.ShowDragonMatchUI(null, false); if (DragonMatchUIViewManager.Instance != null) { DragonMatchUIViewManager.Instance.ShowDragonMatchPlayerInfoUI(false); } return; } if (errorId < 5) { MogoMsgBox.Instance.ShowFloatingText(LanguageData.GetContent(26319 + errorId)); } else { switch (errorId) { case 5: MogoMsgBox.Instance.ShowFloatingText(LanguageData.GetContent(26341)); break; case 6: MogoMsgBox.Instance.ShowFloatingText(LanguageData.GetContent(26340)); break; } } }
//分解单个 public void Decompose(int id, int gridIndex) { m_isDecomposeInDecUI = false; Debug.Log("DecomposeQuality:" + m_equipmentDic[gridIndex].quality); if (((ItemEquipment)m_equipmentDic[gridIndex]).locked) { MogoMsgBox.Instance.ShowMsgBox(LanguageData.GetContent(1083)); return; } if (m_equipmentDic[gridIndex].quality > QULITY_NEED_TIP) { MogoGlobleUIManager.Instance.Confirm(LanguageData.GetContent(1084, m_equipmentDic[gridIndex].name), (rst) => { if (rst) { DecomposeReq(id, gridIndex); MogoGlobleUIManager.Instance.ConfirmHide(); } else { MogoGlobleUIManager.Instance.ConfirmHide(); } }); } else { DecomposeReq(id, gridIndex); } }
/// <summary> /// 设置玩家各榜单排名数据 /// </summary> void PlayerRankDataListResourceLoaded() { var m_dataList = m_playerRankDataMogoListImproved.DataList; for (int i = 0; i < m_dataList.Count; i++) { RankingUIPlayerRankData rankingUIPlayerRankData = (RankingUIPlayerRankData)m_dataList[i]; rankingUIPlayerRankData.RankingUIPlayerRankDataName = m_playerRankDataList[i].rankName; if (m_playerRankDataList[i].rankNum > 0 && m_playerRankDataList[i].rankNum <= MAXRANKNUM) { rankingUIPlayerRankData.RankingUIPlayerRankDataRank = m_playerRankDataList[i].rankNum.ToString(); } else { rankingUIPlayerRankData.RankingUIPlayerRankDataRank = LanguageData.GetContent(47400); } // BoxCollider区域添加滑动 //MogoButton mogoButton = rankingUIPlayerRankData.GetComponent<MogoButton>(); //if (mogoButton == null) // mogoButton = rankingUIPlayerRankData.gameObject.AddComponent<MogoButton>(); //mogoButton.pressHandler = m_tabMogoListImproved.PressHandlerOutSide; //mogoButton.dragHandler = m_tabMogoListImproved.DragHandlerOutSide; } }