public void ShowTime() { if (lostTime <= 0) { isShowTime = false; timeTxt.text = "已可免费购买"; leftDiamondTxt.text = "免费"; if (FunctionOpenMng.GetInstance().GetFunctionOpen(35)) { point.gameObject.SetActive(true); Singleton <RedPointManager> .Instance.AddChildFlag(EnumRedPoint.RP_DRAW, 2); } } else { leftDiamondTxt.text = leftDiamondPrice.ToString(); timeTxt.text = "[acd5ff]" + TimeManager.Instance.GetTimeClockText(lostTime) + "[-]后免费"; point.gameObject.SetActive(false); Singleton <RedPointManager> .Instance.DeletChildFlag(EnumRedPoint.RP_DRAW, 2); } lostSecTime += Time.deltaTime; if (lostSecTime >= 1) { lostTime -= 1; lostSecTime = 0; } }
private void OnRightBtn() { if (GameLibrary.isShow) { return; } //钻石抽奖开启条件 if (!DataDefine.isSkipFunction && !FunctionOpenMng.GetInstance().GetFunctionOpen(35)) { string text = FSDataNodeTable <UnLockFunctionNode> .GetSingleton().DataNodeList[35].limit_tip; //UIPromptBox.Instance.ShowLabel(text); Control.ShowGUI(UIPanleID.UIPromptBox, EnumOpenUIType.DefaultUIOrSecond, false, text); return; } if (playerData.GetInstance().baginfo.diamond > rightDiamondPrice) { GameLibrary.isShow = true; HeroPosEmbattle.instance.ShowLottryAnimaEffect(PosType.Lorry, LotteryType.DiamondLottery, 10, CostType.Cost); object[] obj = new object[7] { 10, LotteryType.DiamondLottery, rightDiamondPrice, nameTxt.text, icon.spriteName, quality.spriteName, id }; Control.ShowGUI(UIPanleID.UIResultLottery, EnumOpenUIType.OpenNewCloseOld, false, obj); Control.HideGUI(UIPanleID.UIMoney); Control.ShowGUI(UIPanleID.UILottryEffect, EnumOpenUIType.DefaultUIOrSecond); } else { Control.HideGUI(UIPanleID.UIMask); //UIPromptBox.Instance.ShowLabel("您的钻石不足请充值"); //Control.ShowGUI(GameLibrary.UIPromptBox); Control.ShowGUI(UIPanleID.UIPromptBox, EnumOpenUIType.DefaultUIOrSecond, false, "您的钻石不足请充值"); } }
/// <summary> /// 商店按钮 /// </summary> public void OnShopBtnClick() { if (TaskAutoTraceManager._instance.isTaskAutoPathfinding) { StopTaskAutoFindWay(); } ////商店解锁 if (DataDefine.isSkipFunction || FunctionOpenMng.GetInstance().GetFunctionOpen(22)) { // UIShop.Instance.IsShop(0); // Control.ShowGUI(GameLibrary.UIShop); object[] obj = new object[2] { 0, 0 }; Control.ShowGUI(UIPanleID.UIShopPanel, EnumOpenUIType.OpenNewCloseOld, false, obj); Control.PlayBgmWithUI(UIPanleID.UIShopPanel); //ClientSendDataMgr.GetSingle().GetCShopSend().RequestGoodsList((int)ShopType.Prop); } else { string text = FSDataNodeTable <UnLockFunctionNode> .GetSingleton().DataNodeList[22].limit_tip; //UIPromptBox.Instance.ShowLabel(text); Control.ShowGUI(UIPanleID.UIPromptBox, EnumOpenUIType.DefaultUIOrSecond, false, text); } }
/// <summary> /// 排行榜 /// </summary> public void OnRankListClick() { if (TaskAutoTraceManager._instance.isTaskAutoPathfinding) { StopTaskAutoFindWay(); } ////排行榜功能开启判断 if (DataDefine.isSkipFunction || FunctionOpenMng.GetInstance().GetFunctionOpen(38)) { Globe.isOpenSend = true; Globe.isOpenLevelSend = true; /// UIRankList._instance.IsRank(0); // Control.ShowGUI(GameLibrary.UIRankList); Control.ShowGUI(UIPanleID.UIRankList, EnumOpenUIType.OpenNewCloseOld, false, 0); Debug.Log("kkk"); //ClientSendDataMgr.GetSingle().GetRankListSend().SendRankList(5); } else { string text = FSDataNodeTable <UnLockFunctionNode> .GetSingleton().DataNodeList[38].limit_tip; //UIPromptBox.Instance.ShowLabel(text); Control.ShowGUI(UIPanleID.UIPromptBox, EnumOpenUIType.DefaultUIOrSecond, false, text); } // UIPromptBox.Instance.ShowLabel("此功能暂未开启"); //ClientSendDataMgr.GetSingle().GetRankListSend().SendRankList((int)RankListType.Level,0,15); // UIRankList._instance.tweenLvView(); //UIRankList._instance.TableBtn[0].transform.GetComponent<UIPlayTween>().Play(true);//暂时注销 }
/// <summary> /// 显示红点 /// </summary> private void ShowRedPoint() { if (playerData.GetInstance().taskDataList.itemList.Find(x => x.state == (int)TaskProgress.Complete) != null || playerData.GetInstance().taskDataList.box1State == (int)TaskProgress.Complete || playerData.GetInstance().taskDataList.box2State == (int)TaskProgress.Complete || playerData.GetInstance().taskDataList.box3State == (int)TaskProgress.Complete || playerData.GetInstance().taskDataList.box4State == (int)TaskProgress.Complete) { redPoint1.Show(); Singleton <RedPointManager> .Instance.AddChildFlag(EnumRedPoint.RD_ACTIVITY, 1); } else { redPoint1.Hide(); Singleton <RedPointManager> .Instance.DeletChildFlag(EnumRedPoint.RD_ACTIVITY, 1); } //---------------------------------------------- //悬赏任务显示红点 if (DataDefine.isSkipFunction && !FunctionOpenMng.GetInstance().GetFunctionOpen(34)) { if (playerData.GetInstance().taskDataList.getCount > 0) { redPoint2.Show(); Singleton <RedPointManager> .Instance.AddChildFlag(EnumRedPoint.RD_ACTIVITY, 2); } } else { redPoint2.Hide(); Singleton <RedPointManager> .Instance.DeletChildFlag(EnumRedPoint.RD_ACTIVITY, 2); } }
private void OnSocietyClick() { if (TaskAutoTraceManager._instance.isTaskAutoPathfinding) { StopTaskAutoFindWay(); } ////公会功能解锁 if (FunctionOpenMng.GetInstance().GetFunctionOpen(20)) { if (SocietyManager.Single().isJoinSociety) { //Control.ShowGUI(GameLibrary.UIHaveJoinSocietyPanel); Control.ShowGUI(UIPanleID.UIHaveJoinSocietyPanel, EnumOpenUIType.OpenNewCloseOld); } else { //Control.ShowGUI(GameLibrary.UINotJoinSocietyPanel); Control.ShowGUI(UIPanleID.UINotJoinSocietyPanel, EnumOpenUIType.OpenNewCloseOld); } } else { string text = FSDataNodeTable <UnLockFunctionNode> .GetSingleton().DataNodeList[20].limit_tip; //UIPromptBox.Instance.ShowLabel(text); Control.ShowGUI(UIPanleID.UIPromptBox, EnumOpenUIType.DefaultUIOrSecond, false, text); } }
/// <summary> /// 副本按钮 /// </summary> private void OnEctypeClick() { if (TaskAutoTraceManager._instance.isTaskAutoPathfinding) { StopTaskAutoFindWay(); } ////冒险按钮开启条件为第一章副本解锁 if (DataDefine.isSkipFunction || FunctionOpenMng.GetInstance().GetFunctionOpen(1)) { Control.ShowGUI(UIPanleID.UILevel, EnumOpenUIType.OpenNewCloseOld, false, OpenLevelType.NormalOpen); //UILevel.instance.openType = OpenLevelType.NormalOpen; //if (null == playerData.GetInstance().worldMap || playerData.GetInstance().worldMap.Count <= 0) //{ // ClientSendDataMgr.GetSingle().GetBattleSend().SendQueryWorldMap();//获取世界副本 //} //else //{ // Control.ShowGUI(GameLibrary.UILevel); //} } else { string text = FSDataNodeTable <UnLockFunctionNode> .GetSingleton().DataNodeList[1].limit_tip; //UIPromptBox.Instance.ShowLabel(text); Control.ShowGUI(UIPanleID.UIPromptBox, EnumOpenUIType.DefaultUIOrSecond, false, text); } }
void UpdateStar(Dictionary <string, object> item, int mapid) { if (null != item && item.Count > 0) { Dictionary <int, int[]> dungeon; if (GameLibrary.mapOrdinary.TryGetValue(mapid, out dungeon)) { dungeon = GameLibrary.mapOrdinary[mapid]; } else { dungeon = new Dictionary <int, int[]>(); } List <string> heroKey = new List <string>(item.Keys); heroKey.Sort(); for (int j = 0; j < heroKey.Count; j++) { if (int.Parse(heroKey[j]) == 0) { continue; } if (j == (heroKey.Count - 1) && Globe.GetStar((int[])(item[heroKey[j]])) > 0) { int nextMapId = mapid + 100; if (!playerData.GetInstance().CanEnterMap.Contains(nextMapId) && playerData.GetInstance().worldMap.Contains(nextMapId) && FunctionOpenMng.GetInstance().GetValu(nextMapId / 100)) { playerData.GetInstance().CanEnterMap.Add(nextMapId); } } int[] stat = (int[])item[heroKey[j]]; if (dungeon.ContainsKey(int.Parse(heroKey[j]))) { //if (Globe.GetStar(dungeon[int.Parse(heroKey[j])]) < Globe.GetStar(stat)) //{ dungeon[int.Parse(heroKey[j])] = stat; //} } else { dungeon.Add(int.Parse(heroKey[j]), stat); } } if (!GameLibrary.mapOrdinary.ContainsKey(mapid)) { GameLibrary.mapOrdinary.Add(mapid, dungeon); } else { GameLibrary.mapOrdinary[mapid] = dungeon; } } }
private void OnLeftBtn() { if (GameLibrary.isShow) { return; } //钻石抽奖开启条件 if (!FunctionOpenMng.GetInstance().GetFunctionOpen(35)) { string text = FSDataNodeTable <UnLockFunctionNode> .GetSingleton().DataNodeList[35].limit_tip; //UIPromptBox.Instance.ShowLabel(text); Control.ShowGUI(UIPanleID.UIPromptBox, EnumOpenUIType.DefaultUIOrSecond, false, text); return; } if (leftDiamondTxt.text == "免费") { GameLibrary.isShow = true; leftDiamondTxt.text = leftDiamondPrice.ToString(); point.gameObject.SetActive(false); Singleton <RedPointManager> .Instance.DeletChildFlag(EnumRedPoint.RP_DRAW, 2); isShowTime = true; Control.ShowGUI(UIPanleID.UILottryEffect, EnumOpenUIType.DefaultUIOrSecond); object[] obj = new object[7] { 1, LotteryType.DiamondLottery, leftDiamondPrice, nameTxt.text, icon.spriteName, quality.spriteName, id }; Control.ShowGUI(UIPanleID.UIResultLottery, EnumOpenUIType.OpenNewCloseOld, false, obj); HeroPosEmbattle.instance.ShowLottryAnimaEffect(PosType.Lorry, LotteryType.DiamondLottery, 1, CostType.Free); Control.HideGUI(UIPanleID.UIMoney); } else if (playerData.GetInstance().baginfo.diamond > leftDiamondPrice) { GameLibrary.isShow = true; Control.ShowGUI(UIPanleID.UILottryEffect, EnumOpenUIType.DefaultUIOrSecond); object[] obj = new object[7] { 1, LotteryType.DiamondLottery, leftDiamondPrice, nameTxt.text, icon.spriteName, quality.spriteName, id };; Control.ShowGUI(UIPanleID.UIResultLottery, EnumOpenUIType.OpenNewCloseOld, false, obj); HeroPosEmbattle.instance.ShowLottryAnimaEffect(PosType.Lorry, LotteryType.DiamondLottery, 1, CostType.Cost); Control.HideGUI(UIPanleID.UIMoney); } else { //Control.ShowGUI(GameLibrary.UIPromptBox); Control.HideGUI(UIPanleID.UIMask); //UIPromptBox.Instance.ShowLabel("您的钻石不足请充值"); Control.ShowGUI(UIPanleID.UIPromptBox, EnumOpenUIType.DefaultUIOrSecond, false, "您的钻石不足请充值"); } }
//1v1功能 void V1BtnClick(GameObject go) { if (DataDefine.isSkipFunction || FunctionOpenMng.GetInstance().GetFunctionOpen(17)) { Control.ShowGUI(UIPanleID.UIEmbattle, EnumOpenUIType.OpenNewCloseOld, false, OpenSourceType.Moba); } else { string text = FSDataNodeTable <UnLockFunctionNode> .GetSingleton().DataNodeList[17].limit_tip; //UIPromptBox.Instance.ShowLabel(text); Control.ShowGUI(UIPanleID.UIPromptBox, EnumOpenUIType.DefaultUIOrSecond, false, text); } }
private void OnGlogClick() { //playerData.GetInstance().MoneyHadler(MoneyType.Gold, 10000); if (DataDefine.isSkipFunction || FunctionOpenMng.GetInstance().GetFunctionOpen(11)) { Control.ShowGUI(UIPanleID.UIGoldHand, EnumOpenUIType.DefaultUIOrSecond); } else { string text = FSDataNodeTable <UnLockFunctionNode> .GetSingleton().DataNodeList[11].limit_tip; //UIPromptBox.Instance.ShowLabel(text); Control.ShowGUI(UIPanleID.UIPromptBox, EnumOpenUIType.DefaultUIOrSecond, false, text); } }
public void OnAbattoirBtnClick() { if (FunctionOpenMng.GetInstance().GetFunctionOpen(8)) { //角斗场功能开启 Control.ShowGUI(UIPanleID.UIAbattiorList, EnumOpenUIType.OpenNewCloseOld, false, false); } else { string text = FSDataNodeTable <UnLockFunctionNode> .GetSingleton().DataNodeList[8].limit_tip; //UIPromptBox.Instance.ShowLabel(text); Control.ShowGUI(UIPanleID.UIPromptBox, EnumOpenUIType.DefaultUIOrSecond, false, text); } }
void OnArenaBtnClick() { if (DataDefine.isSkipFunction || FunctionOpenMng.GetInstance().GetFunctionOpen(17)) { //竞技场功能开启 //Hide(); Control.ShowGUI(UIPanleID.UIArenaModePanel, EnumOpenUIType.OpenNewCloseOld, false); } else { string text = FSDataNodeTable <UnLockFunctionNode> .GetSingleton().DataNodeList[17].limit_tip; //UIPromptBox.Instance.ShowLabel(text); Control.ShowGUI(UIPanleID.UIPromptBox, EnumOpenUIType.DefaultUIOrSecond, false, text); } }
public bool GuideFunctionOpening(CReadPacket packet) { Dictionary <string, object> data = packet.data; int[] item = data["func"] as int[]; if (null != item) { UnLockFunctionNode lockfunciton = null; List <int> chapterId = new List <int>(); for (int i = 0; i < item.Length; i++) { lockfunciton = FSDataNodeTable <UnLockFunctionNode> .GetSingleton().FindDataByType(item[i]); if (null == lockfunciton) { continue; } if (lockfunciton.chapter_id != 0)//解锁副本 { chapterId.Add(lockfunciton.chapter_id); } //设置相应的功能位开启 FunctionOpenMng.GetInstance().SetValue(item[i]); //if(lockfunciton.id == 1|| lockfunciton.id == 2|| lockfunciton.id == 3|| lockfunciton.id ==4|| lockfunciton.id ==5|| lockfunciton.id ==6) //{ // UILevel.instance.openType = OpenLevelType.SysOpen; // ClientSendDataMgr.GetSingle().GetBattleSend().SendQueryWorldMap();//获取世界副本 //} } if (chapterId.Count > 0) { Dictionary <string, object> newpacket1 = new Dictionary <string, object>(); newpacket1.Add("arg1", chapterId); newpacket1.Add("arg2", 1); Singleton <Notification> .Instance.Send(MessageID.pve_dungeon_list_req, newpacket1, C2SMessageType.ActiveWait); Dictionary <string, object> newpacket2 = new Dictionary <string, object>(); newpacket2.Add("arg1", chapterId); newpacket2.Add("arg2", 2); Singleton <Notification> .Instance.Send(MessageID.pve_dungeon_list_req, newpacket2, C2SMessageType.ActiveWait); //ClientSendDataMgr.GetSingle().GetBattleSend().SendQueryDungeonList(chapterId, 1); //ClientSendDataMgr.GetSingle().GetBattleSend().SendQueryDungeonList(chapterId, 2); } } return(true); }
void OnNextMap() { //章节开放 int prevID = CurrentMap.MapData.MapId + 100; if (DataDefine.isSkipFunction || FunctionOpenMng.GetInstance().GetFunctionOpen(prevID / 100) && prevID / 100 <= 6) { RefreshUI(FSDataNodeTable <MapNode> .GetSingleton().FindDataByType(prevID), types); } else { string text = FSDataNodeTable <UnLockFunctionNode> .GetSingleton().DataNodeList[prevID / 100].limit_tip; //UIPromptBox.Instance.ShowLabel(text); Control.ShowGUI(UIPanleID.UIPromptBox, EnumOpenUIType.DefaultUIOrSecond, false, text); } }
//private void ShowE() //{ // sysTemTweenP.gameObject.SetActive(false); //} //public bool b; //public int RefreshExpBar(int addExp) //{ // Upgradelvl = 0; // playerData.GetInstance().selfData.exprience += addExp; // PlayerUpgrade(); // expBar.InValue(int.Parse(playerData.GetInstance().selfData.exprience.ToString()), int.Parse(playerData.GetInstance().selfData.maxExprience.ToString())); // expBar.onChange = OnExpChange; // if (Upgradelvl > 0) // { // playerData.GetInstance().ChangeActionPointCeilingHandler(); // } // return Upgradelvl; //} //void PlayerUpgrade() //{ // if (playerData.GetInstance().selfData.exprience >= playerData.GetInstance().selfData.maxExprience) // { // playerData.GetInstance().selfData.exprience -= playerData.GetInstance().selfData.maxExprience; // playerData.GetInstance().selfData.level++; // Upgradelvl++; // playerData.GetInstance().selfData.maxExprience = FSDataNodeTable<PlayerLevelUpNode>.GetSingleton().FindDataByType(playerData.GetInstance().selfData.level).exp; // if (playerData.GetInstance().selfData.exprience < playerData.GetInstance().selfData.maxExprience) // return; // } // if (playerData.GetInstance().selfData.exprience < playerData.GetInstance().selfData.maxExprience) // return; // PlayerUpgrade(); //} public void OnEquipBtn() { if (TaskAutoTraceManager._instance.isTaskAutoPathfinding) { StopTaskAutoFindWay(); } if (!DataDefine.isSkipFunction && !FunctionOpenMng.GetInstance().GetFunctionOpen(14)) { string text = FSDataNodeTable <UnLockFunctionNode> .GetSingleton().DataNodeList[14].limit_tip; //UIPromptBox.Instance.ShowLabel(text); Control.ShowGUI(UIPanleID.UIPromptBox, EnumOpenUIType.DefaultUIOrSecond, false, text); return; } //ClientSendDataMgr.GetSingle().GetHeroSend().SendGetHeroInfo(Globe.fightHero[0], C2SMessageType.ActiveWait); //获取英雄信息 //playerData.GetInstance().isEquipDevelop = true; Control.ShowGUI(UIPanleID.EquipDevelop, EnumOpenUIType.OpenNewCloseOld); }
private void OnCheckClick(int index, bool boo) { if (boo) { this._index = index; switch (index) { case 0: // RefreshUI(); _view.GetComponent <UIScrollView>().ResetPosition(); // ClientSendDataMgr.GetSingle().GetTaskSend().common_mission_box_info_req(); Show(); break; case 1: if (!DataDefine.isSkipFunction && !FunctionOpenMng.GetInstance().GetFunctionOpen(34)) { string text = FSDataNodeTable <UnLockFunctionNode> .GetSingleton().DataNodeList[34].limit_tip; object[] obj = new object[5] { text, null, UIPopupType.OnlyShow, this.gameObject, "DefaultReward" }; Control.ShowGUI(UIPanleID.UIPopUp, EnumOpenUIType.DefaultUIOrSecond, false, obj); return; } else { Show(); _view.GetComponent <UIScrollView>().ResetPosition(); } break; case 2: RefreshUI(); break; case 3: RefreshUI(); break; } } }
/// <summary> /// 背包按钮 /// </summary> public void OnBagClick() { if (TaskAutoTraceManager._instance.isTaskAutoPathfinding) { StopTaskAutoFindWay(); } if (DataDefine.isSkipFunction || FunctionOpenMng.GetInstance().GetFunctionOpen(32)) { //Control.ShowGUI(GameLibrary.UIKnapsack); Control.ShowGUI(UIPanleID.UIKnapsack, EnumOpenUIType.OpenNewCloseOld); } else { string text = FSDataNodeTable <UnLockFunctionNode> .GetSingleton().DataNodeList[0].limit_tip; //UIPromptBox.Instance.ShowLabel(text); Control.ShowGUI(UIPanleID.UIPromptBox, EnumOpenUIType.DefaultUIOrSecond, false, text); } }
/// <summary> /// 试练 /// </summary> public void OnEnchantBtnClick() { if (TaskAutoTraceManager._instance.isTaskAutoPathfinding) { StopTaskAutoFindWay(); } ////试炼按钮开启条件为金币副本开启 if (DataDefine.isSkipFunction || FunctionOpenMng.GetInstance().GetFunctionOpen(13)) { Control.ShowGUI(UIPanleID.UIActivity, EnumOpenUIType.OpenNewCloseOld, false); //ClientSendDataMgr.GetSingle().GetBattleSend().SendQueryEventList();//获取活动副本列表 } else { string text = FSDataNodeTable <UnLockFunctionNode> .GetSingleton().DataNodeList[13].limit_tip; //UIPromptBox.Instance.ShowLabel(text); Control.ShowGUI(UIPanleID.UIPromptBox, EnumOpenUIType.DefaultUIOrSecond, false, text); } }
//好友 public void OnFriendClick() { if (TaskAutoTraceManager._instance.isTaskAutoPathfinding) { StopTaskAutoFindWay(); } ////好友功能开启 if (DataDefine.isSkipFunction || FunctionOpenMng.GetInstance().GetFunctionOpen(12)) { // ClientSendDataMgr.GetSingle().GetFriendSend().FriendsRecommendRequest(); Control.ShowGUI(UIPanleID.UIFriends, EnumOpenUIType.OpenNewCloseOld); } else { string text = FSDataNodeTable <UnLockFunctionNode> .GetSingleton().DataNodeList[12].limit_tip; //UIPromptBox.Instance.ShowLabel(text); Control.ShowGUI(UIPanleID.UIPromptBox, EnumOpenUIType.DefaultUIOrSecond, false, text); } }
public void OnArenaABtnClick() { if (TaskAutoTraceManager._instance.isTaskAutoPathfinding) { StopTaskAutoFindWay(); } //对战按钮开启条件是角斗场或竞技场之一开启就开启 if (DataDefine.isSkipFunction || DataDefine.isSkipFunction || FunctionOpenMng.GetInstance().GetFunctionOpen(8) || FunctionOpenMng.GetInstance().GetFunctionOpen(17)) { Control.ShowGUI(UIPanleID.UIPvP, EnumOpenUIType.OpenNewCloseOld, false); //Control.ShowGUI(GameLibrary.UIPvP); //Control.PlayBgmWithUI(GameLibrary.UIPvP); } else { string text = FSDataNodeTable <UnLockFunctionNode> .GetSingleton().DataNodeList[17].limit_tip; //UIPromptBox.Instance.ShowLabel(text); Control.ShowGUI(UIPanleID.UIPromptBox, EnumOpenUIType.DefaultUIOrSecond, false, text); } }
/// <summary> /// 抽奖 /// </summary> public void OnAltarClick() { if (TaskAutoTraceManager._instance.isTaskAutoPathfinding) { StopTaskAutoFindWay(); } ////祭坛抽奖开放条件,金币抽奖开启 if (DataDefine.isSkipFunction || FunctionOpenMng.GetInstance().GetFunctionOpen(33)) { Control.ShowGUI(UIPanleID.UILottery, EnumOpenUIType.OpenNewCloseOld); // ClientSendDataMgr.GetSingle().GetLotterHotSend().LotteryHotRequest(); // } else { string text = FSDataNodeTable <UnLockFunctionNode> .GetSingleton().DataNodeList[33].limit_tip; //UIPromptBox.Instance.ShowLabel(text); Control.ShowGUI(UIPanleID.UIPromptBox, EnumOpenUIType.DefaultUIOrSecond, false, text); } }
/// <summary> /// 服务器返回数据添加到字典中或用于客户端更新字典状态 /// </summary> /// <param name="key"></param> /// <param name="rd"></param> public void Add(EnumRedPoint key, List <int> rd) { if (GetunlockFunction((int)key) != -1) { if (DataDefine.isSkipFunction || FunctionOpenMng.GetInstance().GetFunctionOpen(GetunlockFunction((int)key))) { if (!redList.ContainsKey((int)key)) { redList.Add((int)key, rd); } else { //List<int> ls = null; //redList.TryGetValue((int)key, out ls); //ls = rd; if (rd != null) { redList[(int)key] = rd; } } } } else { if (!redList.ContainsKey((int)key)) { redList.Add((int)key, rd); } else { //List<int> ls = null; //redList.TryGetValue((int)key, out ls); //ls = rd; if (rd != null) { redList[(int)key] = rd; } } } }
private void OnShouCangClick() { if (TaskAutoTraceManager._instance.isTaskAutoPathfinding) { StopTaskAutoFindWay(); } if (DataDefine.isSkipFunction || FunctionOpenMng.GetInstance().GetFunctionOpen(39)) { Debug.Log("打开收藏界面"); //UIMountAndPet.Instance.SetShowType(MountAndPet.Mount, EntranceType.Main); //Control.ShowGUI(GameLibrary.UIMountAndPet); Control.ShowGUI(UIPanleID.UIMountAndPet, EnumOpenUIType.OpenNewCloseOld, false, MountAndPet.Mount); Control.PlayBgmWithUI(UIPanleID.UIMountAndPet); } else { string text = FSDataNodeTable <UnLockFunctionNode> .GetSingleton().DataNodeList[39].limit_tip; //UIPromptBox.Instance.ShowLabel(text); Control.ShowGUI(UIPanleID.UIPromptBox, EnumOpenUIType.DefaultUIOrSecond, false, text); } }
// Use this for initialization private void OnTaskBtn() { if (TaskAutoTraceManager._instance.isTaskAutoPathfinding) { StopTaskAutoFindWay(); } ////日常任务开启时,活动按钮才开启 if (DataDefine.isSkipFunction || FunctionOpenMng.GetInstance().GetFunctionOpen(37)) { print("任务"); Control.ShowGUI(UIPanleID.UIActivities, EnumOpenUIType.OpenNewCloseOld); // UIPromptBox.Instance.ShowLabel("暂未开启"); //测试动态加载 //Control.ShowGUI(GameLibrary.UIActivities); } else { string text = FSDataNodeTable <UnLockFunctionNode> .GetSingleton().DataNodeList[37].limit_tip; //UIPromptBox.Instance.ShowLabel(text); Control.ShowGUI(UIPanleID.UIPromptBox, EnumOpenUIType.DefaultUIOrSecond, false, text); } }
public bool TaskCommonResult(CReadPacket packet) { //{msgid=305, opt1=内部协议号/子协议号, opt2=类型/任务2/引导5, opt3= 预留/任务Id/1024引导解锁, opt4=预留/地图Id/引导起始位置,opt5= 预留/副本Id/引导Id,opt6= 预留,opt7= 预留,user1=内部协议内容 user2=发送人名字可为空 user3="保留"} Debug.Log("TaskCommonResult任务通用协议"); Dictionary <string, object> data = packet.data; int resolt = int.Parse(data["ret"].ToString()); if (resolt == 0) { switch (int.Parse(data["opt2"].ToString())) { case 2: FubenTaskData fubenTaskData = new FubenTaskData(); fubenTaskData.opt1 = int.Parse(data["opt1"].ToString()); fubenTaskData.taskType = int.Parse(data["opt2"].ToString()); fubenTaskData.taskId = int.Parse(data["opt3"].ToString()); fubenTaskData.opt4 = long.Parse(data["opt4"].ToString()); //副本任务 -- 地图id 采集任务--物品id 杀怪任务 --怪物id fubenTaskData.opt5 = int.Parse(data["opt5"].ToString()); //副本任务-- 副本id 采集任务--数量 杀怪任务 -- 怪物数量 fubenTaskData.opt6 = long.Parse(data["opt6"].ToString()); //采集任务--物品id 杀怪任务 --怪物id fubenTaskData.opt7 = int.Parse(data["opt7"].ToString()); //采集任务--数量 杀怪任务 -- 怪物数量 //fubenTaskData.user1 = data["user1"].ToString(); //fubenTaskData.user2 = data["user2"].ToString(); //fubenTaskData.user3 = data["user3"].ToString(); /*1:对话;2:通关副本;3:采集;4:提升技能等级;5:提升英雄装备等级;6:杀怪;7:怪物掉落物;8:背包物品;9:指定地点;*/ if (FSDataNodeTable <TaskDataNode> .GetSingleton().DataNodeList.ContainsKey(fubenTaskData.taskId)) { // 是副本任务 将副本数据存入副本任务数据列表 if (FSDataNodeTable <TaskDataNode> .GetSingleton().DataNodeList[fubenTaskData.taskId].Requiretype == 2) { if (TaskManager.Single().TaskToFubenDic.ContainsKey(fubenTaskData.taskId)) { TaskManager.Single().TaskToFubenDic[fubenTaskData.taskId] = fubenTaskData; } else { TaskManager.Single().TaskToFubenDic.Add(fubenTaskData.taskId, fubenTaskData); } } // 是采集任务 将采集数据存入采集任务数据列表 else if (FSDataNodeTable <TaskDataNode> .GetSingleton().DataNodeList[fubenTaskData.taskId].Requiretype == 3) { if (TaskManager.Single().TaskToCaijiDic.ContainsKey(fubenTaskData.taskId)) { TaskManager.Single().TaskToCaijiDic[fubenTaskData.taskId] = fubenTaskData; } else { TaskManager.Single().TaskToCaijiDic.Add(fubenTaskData.taskId, fubenTaskData); } //存一下数量 if (fubenTaskData.opt4 != 0) { if (TaskManager.Single().TaskItemCountsDic.ContainsKey(fubenTaskData.opt4)) { if (TaskManager.Single().TaskItemCountsDic[fubenTaskData.opt4] < (int)TaskManager.MainTask.parm1) { TaskManager.Single().TaskItemCountsDic[fubenTaskData.opt4] = (int)TaskManager.MainTask.parm1; } } else { TaskManager.Single().TaskItemCountsDic.Add(fubenTaskData.opt4, (int)TaskManager.MainTask.parm1); } } if (fubenTaskData.opt6 != 0) { if (TaskManager.Single().TaskItemCountsDic.ContainsKey(fubenTaskData.opt6)) { if (TaskManager.Single().TaskItemCountsDic[fubenTaskData.opt6] < (int)TaskManager.MainTask.parm2) { TaskManager.Single().TaskItemCountsDic[fubenTaskData.opt6] = (int)TaskManager.MainTask.parm2; } } else { TaskManager.Single().TaskItemCountsDic.Add(fubenTaskData.opt6, (int)TaskManager.MainTask.parm2); } } } // 是杀怪任务 将杀怪数据存入杀怪任务数据列表 else if (FSDataNodeTable <TaskDataNode> .GetSingleton().DataNodeList[fubenTaskData.taskId].Requiretype == 6) { if (TaskManager.Single().TaskToSkillMonsterDic.ContainsKey(fubenTaskData.taskId)) { TaskManager.Single().TaskToSkillMonsterDic[fubenTaskData.taskId] = fubenTaskData; } else { TaskManager.Single().TaskToSkillMonsterDic.Add(fubenTaskData.taskId, fubenTaskData); } if (fubenTaskData.opt4 != 0) { if (TaskManager.Single().TaskSkillMonsterCountsDic.ContainsKey(fubenTaskData.opt4)) { if (TaskManager.Single().TaskSkillMonsterCountsDic[fubenTaskData.opt4] < (int)TaskManager.MainTask.parm1) { TaskManager.Single().TaskSkillMonsterCountsDic[fubenTaskData.opt4] = (int)TaskManager.MainTask.parm1; } } else { TaskManager.Single().TaskSkillMonsterCountsDic.Add(fubenTaskData.opt4, (int)TaskManager.MainTask.parm1); } } if (fubenTaskData.opt6 != 0) { if (TaskManager.Single().TaskSkillMonsterCountsDic.ContainsKey(fubenTaskData.opt6)) { if (TaskManager.Single().TaskSkillMonsterCountsDic[fubenTaskData.opt6] < (int)TaskManager.MainTask.parm2) { TaskManager.Single().TaskSkillMonsterCountsDic[fubenTaskData.opt6] = (int)TaskManager.MainTask.parm2; } } else { TaskManager.Single().TaskSkillMonsterCountsDic.Add(fubenTaskData.opt6, (int)TaskManager.MainTask.parm2); } } } //是使用道具任务 将到指定地点使用道具数据存入列表 else if (FSDataNodeTable <TaskDataNode> .GetSingleton().DataNodeList[fubenTaskData.taskId].Requiretype == 9) { if (TaskManager.Single().TaskToTargetUseItemDic.ContainsKey(fubenTaskData.taskId)) { TaskManager.Single().TaskToTargetUseItemDic[fubenTaskData.taskId] = fubenTaskData; } else { TaskManager.Single().TaskToTargetUseItemDic.Add(fubenTaskData.taskId, fubenTaskData); } } //是杀怪掉落物任务 将杀怪掉落物的物品id和数量存入列表 else if (FSDataNodeTable <TaskDataNode> .GetSingleton().DataNodeList[fubenTaskData.taskId].Requiretype == 7) { if (TaskManager.Single().TaskToSMGoodsDic.ContainsKey(fubenTaskData.taskId)) { TaskManager.Single().TaskToSMGoodsDic[fubenTaskData.taskId] = fubenTaskData; } else { TaskManager.Single().TaskToSMGoodsDic.Add(fubenTaskData.taskId, fubenTaskData); } if (fubenTaskData.opt4 != 0) { if (TaskManager.Single().TaskSMGoodsCountDic.ContainsKey(fubenTaskData.opt4)) { if (TaskManager.Single().TaskSMGoodsCountDic[fubenTaskData.opt4] < (int)TaskManager.MainTask.parm1) { TaskManager.Single().TaskSMGoodsCountDic[fubenTaskData.opt4] = (int)TaskManager.MainTask.parm1; } } else { TaskManager.Single().TaskSMGoodsCountDic.Add(fubenTaskData.opt4, (int)TaskManager.MainTask.parm1); } } if (fubenTaskData.opt6 != 0) { if (TaskManager.Single().TaskSMGoodsCountDic.ContainsKey(fubenTaskData.opt6)) { if (TaskManager.Single().TaskSMGoodsCountDic[fubenTaskData.opt6] < (int)TaskManager.MainTask.parm2) { TaskManager.Single().TaskSMGoodsCountDic[fubenTaskData.opt6] = (int)TaskManager.MainTask.parm2; } } else { TaskManager.Single().TaskSMGoodsCountDic.Add(fubenTaskData.opt6, (int)TaskManager.MainTask.parm2); } } } } if (Singleton <SceneManage> .Instance.Current == EnumSceneID.UI_MajorCity01 || Singleton <SceneManage> .Instance.Current == EnumSceneID.LGhuangyuan) { //Control.ShowGUI(GameLibrary.UITaskTracker); } break; case 5: if (FunctionOpenMng.GetInstance().GetIndexbypos(int.Parse(data["opt3"].ToString()), int.Parse(data["opt4"].ToString()))) { //Debug.Log("<color=#10DF11>GetInstance uId</color>" + playerData.GetInstance().guideData.uId); if (playerData.GetInstance().guideData.uId != 0 && playerData.GetInstance().guideData.uId != int.Parse(data["opt5"].ToString())) { //Debug.Log("<color=#10DF11>GetInstance uId</color>" + playerData.GetInstance().guideData.uId); //Debug.Log("<color=#10DF11>TaskHandle uId</color>" + int.Parse(data["opt5"].ToString())); ClientSendDataMgr.GetSingle().GetGuideSend().SendGuidStep(99); playerData.GetInstance().guideData.uId = int.Parse(data["opt5"].ToString()); //Debug.Log("<color=#10DF11>GetInstance uId=TaskHandle uId</color>" + playerData.GetInstance().guideData.uId); GuidAskEvent(); } else if (playerData.GetInstance().guideData.uId == 0) { //Debug.Log("<color=#10DF11>GetInstance uId</color>" + playerData.GetInstance().guideData.uId); playerData.GetInstance().guideData.uId = int.Parse(data["opt5"].ToString()); GuidAskEvent(); } } break; default: break; } } return(true); }
private void OnLeftBtn() { if (GameLibrary.isShow) { return; } //金币抽奖开启条件 if (!DataDefine.isSkipFunction && !FunctionOpenMng.GetInstance().GetFunctionOpen(33)) { string text = FSDataNodeTable <UnLockFunctionNode> .GetSingleton().DataNodeList[33].limit_tip; //UIPromptBox.Instance.ShowLabel(text); Control.ShowGUI(UIPanleID.UIPromptBox, EnumOpenUIType.DefaultUIOrSecond, false, text); return; } if (leftGoldTxt.text == "免费") { GameLibrary.isShow = true; if (freeCount >= 1) { freeCount -= 1; isShowTime = true; } point.gameObject.SetActive(false); Singleton <RedPointManager> .Instance.DeletChildFlag(EnumRedPoint.RP_DRAW, 1); leftGoldTxt.text = leftGoldPrice.ToString(); timeTxt.text = "[acd5ff]" + TimeManager.Instance.GetTimeClockText(lostTime) + "[-]后免费" + "[2dd740](" + freeCount + "/" + maxFreeCount + ")"; // freeCountTxt.text = "[2dd740](" + freeCount + "/" + maxFreeCount + ")"; leftBtn.text = "购买1个"; object[] obj = new object[7] { 1, LotteryType.GoldLottery, leftGoldPrice, nameTxt.text, icon.spriteName, quality.spriteName, id }; HeroPosEmbattle.instance.ShowLottryAnimaEffect(PosType.Lorry, LotteryType.GoldLottery, 1, CostType.Free); Control.ShowGUI(UIPanleID.UILottryEffect, EnumOpenUIType.DefaultUIOrSecond); Control.ShowGUI(UIPanleID.UIResultLottery, EnumOpenUIType.OpenNewCloseOld, false, obj); Control.HideGUI(UIPanleID.UIMoney); return; } else if (playerData.GetInstance().baginfo.gold > leftGoldPrice) { GameLibrary.isShow = true; object[] obj = new object[7] { 1, LotteryType.GoldLottery, leftGoldPrice, nameTxt.text, icon.spriteName, quality.spriteName, id }; HeroPosEmbattle.instance.ShowLottryAnimaEffect(PosType.Lorry, LotteryType.GoldLottery, 1, CostType.Cost); Control.ShowGUI(UIPanleID.UILottryEffect, EnumOpenUIType.DefaultUIOrSecond); Control.ShowGUI(UIPanleID.UIResultLottery, EnumOpenUIType.OpenNewCloseOld, false, obj); Control.HideGUI(UIPanleID.UIMoney); } else { //Control.ShowGUI(GameLibrary.UIPromptBox); Control.HideGUI(UIPanleID.UIMask); //UIPromptBox.Instance.ShowLabel("您的金币不足请充值"); Control.ShowGUI(UIPanleID.UIPromptBox, EnumOpenUIType.DefaultUIOrSecond, false, "您的钻石不足请充值"); } }
public override void Info(object obj) { if (obj != null) { id = int.Parse(obj.ToString()); bossIcon.gameObject.SetActive(false); if (99 < id && id < 30000)//副本 { if (FSDataNodeTable <SceneNode> .GetSingleton().DataNodeList.ContainsKey(id)) { sceneNode = FSDataNodeTable <SceneNode> .GetSingleton().DataNodeList[id]; if (id % 2 == 0) { wayName.text = sceneNode.SceneName + "(精英)"; } else { wayName.text = sceneNode.SceneName; } //daguanSprite.spriteName = SceneIcon(sceneNode.game_type); //if (null != sceneNode.icon_name && sceneNode.icon_name != "0") //{ // bossIcon.gameObject.SetActive(true); // bossIcon.spriteName = sceneNode.icon_name; //} //else //{ // bossIcon.gameObject.SetActive(false); //} daguanSprite.spriteName = "maoxian"; //获得关卡是够已经开启 int bigmapID = sceneNode.bigmap_id;//大关id if (GameLibrary.mapOrdinary.ContainsKey(bigmapID)) { if (GameLibrary.mapOrdinary[bigmapID].ContainsKey(id)) { if (FunctionOpenMng.GetInstance().GetFunctionOpen(bigmapID / 100)) { if (Globe.GetStar(GameLibrary.mapOrdinary[bigmapID][id]) < 0)//通过小关星级判断是否开启 -1不开启 { isOpened = false; } else { isOpened = true; } } else { isOpened = false; } } } } } if (30000 < id)//试练 { if (FSDataNodeTable <SceneNode> .GetSingleton().DataNodeList.ContainsKey(id)) { sceneNode = FSDataNodeTable <SceneNode> .GetSingleton().DataNodeList[id]; wayName.text = sceneNode.SceneName; int bigmapID = sceneNode.bigmap_id;//大关id //daguanSprite.spriteName = SceneIcon(sceneNode.game_type); daguanSprite.spriteName = "shijian"; if (GameLibrary.eventsList.ContainsKey(bigmapID)) { List <int[]> temarr = GameLibrary.eventsList[bigmapID]; string temStr = id.ToString(); int temcount = int.Parse(temStr.Substring(temStr.Length - 1, 1));//截取试练id的最后一位 然后去取相对应的星级 if (temcount > 1 && temarr.Count >= temcount) { if (Globe.GetStar(temarr[temcount - 1]) < 0) { isOpened = false; } else { isOpened = true; } } } } } if (!isOpened) { isOpen.gameObject.SetActive(true); openSprite.gameObject.SetActive(false); isOpen.text = "[ff0000]未开放[-]"; } else { isOpen.gameObject.SetActive(false); openSprite.gameObject.SetActive(true); } //打开面板 if (id == 3)//祭坛 { wayName.text = "祭坛"; daguanSprite.spriteName = "jitan"; HidePng(); } //打开面板 if (id == 4)//远征商店 { wayName.text = "角斗场商店"; daguanSprite.spriteName = "shangdian"; HidePng(); } if (id == 5)//竞技场商店 { wayName.text = "竞技场商店"; daguanSprite.spriteName = "shangdian"; HidePng(); } if (id == 6)//公会商店 { wayName.text = "公会商店"; daguanSprite.spriteName = "shangdian"; HidePng(); } } }
/// <summary> /// 英雄详情标签 /// </summary> /// <param name="index"></param> /// <param name="boo"></param> private void OnDetailsTabClick(int index, bool boo) { if (index == 4) { //英雄的技能开放验证 if (!DataDefine.isSkipFunction && !FunctionOpenMng.GetInstance().GetFunctionOpen(7)) { string text = FSDataNodeTable <UnLockFunctionNode> .GetSingleton().DataNodeList[7].limit_tip; //UIPromptBox.Instance.ShowLabel(text); Control.ShowGUI(UIPanleID.UIPromptBox, EnumOpenUIType.DefaultUIOrSecond, false, text); return; } } if (index == 3) { //英雄的装备页签开放验证 if (!DataDefine.isSkipFunction && !FunctionOpenMng.GetInstance().GetFunctionOpen(14)) { string text = FSDataNodeTable <UnLockFunctionNode> .GetSingleton().DataNodeList[14].limit_tip; //UIPromptBox.Instance.ShowLabel(text); Control.ShowGUI(UIPanleID.UIPromptBox, EnumOpenUIType.DefaultUIOrSecond, false, text); return; } } if (boo == false) { return; } UpGradeStar.gameObject.SetActive(false); Equip.gameObject.SetActive(false); heroDes.gameObject.SetActive(false); HeroSkill.gameObject.SetActive(false); Runes.gameObject.SetActive(false); breakthrough.gameObject.SetActive(false); switch (index) { case 0: if (playerData.GetInstance().GetHeroDataByID((Globe.selectHero.hero_id)) == null) { detailsTab.GetBoxList()[0].transform.Find("Label").GetComponent <UILabel>().text = "技能"; SkillListShow(); for (int i = 1; i < detailsTab.GetBoxList().Length; i++) { detailsTab.GetBoxList()[i].gameObject.SetActive(false); } } else { HeroAndEquipNodeData.TabType = 0; HeroAndEquipNodeData.TanNUm = 0; NameArea.gameObject.SetActive(true); Blickline.gameObject.SetActive(false); heroDes.ShowOrHidePanel(false); ScrollViewResetPosition(); Property.SetActive(true); upGradeProperty.SetActive(false); Property.transform.localPosition = new Vector3(408, -110, 0); detailsTab.GetBoxList()[0].transform.Find("Label").GetComponent <UILabel>().text = "属性"; for (int i = 0; i < detailsTab.GetBoxList().Length; i++) { detailsTab.GetBoxList()[i].gameObject.SetActive(true); } } //HeroDescription.Instance().OnAttributesBtn(); //Control.ShowGUI(GameLibrary.UI_HeroDetail); //SkillListShow(); break; case 1: HeroAndEquipNodeData.TabType = 0; HeroAndEquipNodeData.TanNUm = 1; NameArea.gameObject.SetActive(true); Blickline.gameObject.SetActive(true); UpGradeStar.gameObject.SetActive(true); if (UpGradeState) { UpdateInfo(); UpGradeState = false; } ScrollViewResetPosition(); Property.SetActive(false); upGradeProperty.SetActive(true); Property.transform.localPosition = new Vector3(408, 70, 0); break; case 2: HeroAndEquipNodeData.TabType = 0; HeroAndEquipNodeData.TanNUm = 2; NameArea.gameObject.SetActive(true); breakthrough.gameObject.SetActive(true); Blickline.gameObject.SetActive(false); Property.SetActive(true); upGradeProperty.SetActive(false); Property.transform.localPosition = new Vector3(408, 56, 0); ScrollViewResetPosition(); break; case 3: //装备 HeroAndEquipNodeData.TabType = 0; HeroAndEquipNodeData.TanNUm = 3; BtnState = true; AdvancedBtn.gameObject.SetActive(true); HeroPreview.gameObject.SetActive(true); EquipIntensify.gameObject.SetActive(false); NameArea.gameObject.SetActive(false); Blickline.gameObject.SetActive(false); Equip.gameObject.SetActive(true); Property.SetActive(false); upGradeProperty.SetActive(false); EquipPanel.instance.ShowEquip(hd); ScrollViewResetPosition(); break; case 4: // HeroAndEquipNodeData.TabType = 0; // HeroAndEquipNodeData.TanNUm = 4; // BtnState = false; // AdvancedBtn.gameObject.SetActive(false); // HeroPreview.gameObject.SetActive(false); // EquipIntensify.gameObject.SetActive(true); // NameArea.gameObject.SetActive(false); // Blickline.gameObject.SetActive(false); // Equip.gameObject.SetActive(true); // EquipPanel.instance.ShowEquip(hd); // ScrollViewResetPosition(); // break; //case 5: SkillListShow(); break; default: break; } }