| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年10月28日
|
| | | // [ Date ]: 2025年12月8日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | |
| | | public int MoneyOriginal;
|
| | | public int UnlockType;
|
| | | public int UnlockValue;
|
| | | public string Name;
|
| | |
|
| | | public override int LoadKey(string _key)
|
| | | {
|
| | |
| | | int.TryParse(tables[11],out UnlockType);
|
| | |
|
| | | int.TryParse(tables[12],out UnlockValue);
|
| | |
|
| | | Name = tables[13];
|
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | |
| | |
|
| | | public static event Action beforePlayerDataInitializeEvent; //重登切换账号 或者 短暂的断线重连 都会触发
|
| | | public static event Action beforePlayerDataInitializeEventOnRelogin; //重登切换账号触发
|
| | | public static event Action beforePlayerDataInitializeEventOnReconnect; //断线重连触发
|
| | | public static event Action beforePlayerDataInitializeEventOnReconnect; //同账号断线重连触发
|
| | | public static event Action afterPlayerDataInitializeEvent;
|
| | | public static event Action switchAccountEvent;
|
| | | public static bool isAfterPlayerDataInitialize = false; //可区分断线重连还是完全重登; 切到登录场景会重置为false,故可判断断线重连
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 6941d0f549d09534083b125a3f958bf6 |
| | | folderAsset: yes |
| | | DefaultImporter: |
| | | externalObjects: {} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | // AB 05 开服庆典信息 #tagSCOSACelebrationInfo
|
| | |
|
| | | public class DTCAB05_tagSCOSACelebrationInfo : DtcBasic {
|
| | | public override void Done(GameNetPackBasic vNetPack) {
|
| | | base.Done(vNetPack);
|
| | | HAB05_tagSCOSACelebrationInfo vNetData = vNetPack as HAB05_tagSCOSACelebrationInfo;
|
| | | }
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: dde0a532fce9aff41bd468e6a0b87511 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 87a175e0ef9386646a517dc77118c1ca |
| | | folderAsset: yes |
| | | DefaultImporter: |
| | | externalObjects: {} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | // AB 05 开服庆典信息 #tagSCOSACelebrationInfo
|
| | |
|
| | | public class HAB05_tagSCOSACelebrationInfo : GameNetPackBasic {
|
| | | public uint PointTotal; // 累计庆典积分
|
| | | public uint PointAward; // 积分阶段奖励记录,按阶段积分排序后索引二进制存储是否已领取
|
| | |
|
| | | public HAB05_tagSCOSACelebrationInfo () {
|
| | | _cmd = (ushort)0xAB05;
|
| | | }
|
| | |
|
| | | public override void ReadFromBytes (byte[] vBytes) {
|
| | | TransBytes (out PointTotal, vBytes, NetDataType.DWORD);
|
| | | TransBytes (out PointAward, vBytes, NetDataType.DWORD);
|
| | | }
|
| | |
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 4b88c80b8a2f30e429deefeacba13d72 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | managers.Add(FuncNPCManager.Instance);
|
| | | managers.Add(GuildBossManager.Instance);
|
| | | managers.Add(LineupRecommendManager.Instance);
|
| | | managers.Add(OSActivityManager.Instance);
|
| | |
|
| | | foreach (var manager in managers)
|
| | | {
|
| | |
| | | //玩家通用排名
|
| | | public class PlayerRankCell : MonoBehaviour
|
| | | {
|
| | | [SerializeField] AvatarCell avatarCell;
|
| | | [SerializeField] AvatarCell avatarCell; // 头像中点击查询玩家详情
|
| | | [SerializeField] Text rankText;
|
| | | [SerializeField] Text rankValueText; //排名比较内容
|
| | | [SerializeField] Text nameText;
|
| | | [SerializeField] OfficialTitleCell officialTitleCell;
|
| | | [SerializeField] Button queryPlayerBtn; //后续添加点击查看玩家详情
|
| | |
|
| | |
|
| | | // rank 为0 代表玩家自己
|
| | | public void Display(int rankType, int rank, string valueFormat)
|
| | | public void Display(int rankType, int rank)
|
| | | {
|
| | | RankData rankData = null;
|
| | | if (rank != 0)
|
| | |
| | | PlayerDatas.Instance.baseData.face,
|
| | | PlayerDatas.Instance.baseData.facePic));
|
| | | rankText.text = Language.Get("L1045");
|
| | | rankValueText.text = "1-1";//Language.Get("L1125");
|
| | | rankValueText.text = "";//Language.Get("L1125");
|
| | | nameText.text = PlayerDatas.Instance.baseData.PlayerName;
|
| | | officialTitleCell.InitUI(PlayerDatas.Instance.baseData.realmLevel, PlayerDatas.Instance.baseData.TitleID);
|
| | | return;
|
| | |
| | | officialTitleCell.SetActive(false);
|
| | | avatarCell.SetActive(false);
|
| | | nameText.text = Language.Get("L1124");
|
| | | rankValueText.text = "1-1";//Language.Get("L1125");
|
| | | rankValueText.text = "";//Language.Get("L1125");
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | avatarCell.SetActive(true);
|
| | | avatarCell.InitUI(AvatarHelper.GetAvatarModel((int)rankData.id, (int)rankData.value3, (int)rankData.value4));
|
| | | nameText.text = rankData.name1;
|
| | | rankValueText.text = RankModel.Instance.GetStoryInfo(rankData.cmpValue); ;
|
| | | rankValueText.text = RankModel.Instance.GetCmpValueStr(rankType, rankData.cmpValue); ;
|
| | | }
|
| | |
|
| | | rankText.text = rank.ToString();
|
| | | if (queryPlayerBtn != null)
|
| | | {
|
| | | queryPlayerBtn.AddListener(() =>
|
| | | {
|
| | |
|
| | | });
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | using UnityEngine.UI; |
| | | |
| | | |
| | | //通用玩家个人排行榜 |
| | | //通用玩家个人排行榜; cell数量是固定的 非动态变化 |
| | | public class PlayerRankWin : UIBase |
| | | { |
| | | [SerializeField] List<PlayerTop3Cell> playerTop3Cells; |
| | |
| | | [SerializeField] PlayerRankCell myRankCell; |
| | | [SerializeField] Button btnClose; |
| | | |
| | | |
| | | [HideInInspector] public int rankType; |
| | | [HideInInspector] public string valueFormat = "{0}"; |
| | | //数据后续从manager中记录获取 |
| | | [HideInInspector] public int groupValue1 = 0; //一般用于跨服 |
| | | [HideInInspector] public int groupValue2 = 0; //一般用于跨服 |
| | | protected int rankType; //从functionOrder获取 |
| | | |
| | | protected override void InitComponent() |
| | | { |
| | | btnClose.AddListener(()=> |
| | | { |
| | | CloseWindow(); |
| | | }); |
| | | btnClose?.AddListener(CloseWindow); |
| | | } |
| | | |
| | | protected override void NextFrameAfterOpen() |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | rankType = functionOrder; |
| | | RankModel.Instance.onRankRefresh += OnRankRefresh; |
| | | scrollerController.OnRefreshCell += OnRefreshCell; |
| | | Refresh(); |
| | | |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | |
| | | |
| | | public override void Refresh() |
| | | { |
| | | cmpStrText.text = Language.Get("RankTypeName_1"); |
| | | cmpStrText.text = RankModel.Instance.GetCmpTabStr(rankType); |
| | | ShowTop3(); |
| | | CreateScroller(); |
| | | ShowMyRank(); |
| | |
| | | void OnRefreshCell(ScrollerDataType type, CellView cell) |
| | | { |
| | | var _cell = cell.GetComponent<PlayerRankCell>(); |
| | | _cell.Display(rankType, cell.index + 1, valueFormat); |
| | | _cell.Display(rankType, cell.index + 1); |
| | | RankModel.Instance.ListenRankPage(rankType, cell.index, groupValue1, groupValue2); |
| | | } |
| | | |
| | |
| | | { |
| | | for (int i = 0; i < playerTop3Cells.Count; i++) |
| | | { |
| | | playerTop3Cells[i].Display(functionOrder, i + 1); |
| | | playerTop3Cells[i].Display(rankType, i + 1); |
| | | } |
| | | } |
| | | |
| | | void ShowMyRank() |
| | | { |
| | | myRankCell.Display(rankType, 0, valueFormat); |
| | | myRankCell.Display(rankType, 0); |
| | | } |
| | | |
| | | |
| | |
| | | //玩家通用的前3排名
|
| | | public class PlayerTop3Cell : MonoBehaviour
|
| | | {
|
| | | //[SerializeField] Model 显示NPC 武将模型
|
| | | [SerializeField] Text rankValueText; //排名比较内容
|
| | | [SerializeField] Text nameText;
|
| | | [SerializeField] OfficialTitleCell officialTitleCell;
|
| | | [SerializeField] Button queryPlayerBtn; //后续添加点击查看玩家详情
|
| | | [SerializeField] HorseController model;
|
| | |
|
| | | public void Display(int rankType, int rank, string valueFormat = "{0}")
|
| | | public void Display(int rankType, int rank)
|
| | | {
|
| | | var rankData = RankModel.Instance.GetRankDataByRank(rankType, rank);
|
| | | if (rankData == null)
|
| | | {
|
| | | rankValueText.text = "1-1";//Language.Get("L1125");
|
| | | rankValueText.text = "";//Language.Get("L1125");
|
| | | nameText.text = Language.Get("L1124");
|
| | | officialTitleCell.SetActive(false);
|
| | | return;
|
| | | }
|
| | | officialTitleCell.SetActive(true);
|
| | | //rankValueText.text = string.Format(valueFormat, UIHelper.ReplaceLargeNum(rankData.cmpValue2 + rankData.cmpValue * Constants.ExpPointValue));
|
| | | rankValueText.text = RankModel.Instance.GetStoryInfo(rankData.cmpValue);
|
| | | rankValueText.text = RankModel.Instance.GetCmpValueStr(rankType, rankData.cmpValue);
|
| | | nameText.text = rankData.name1;
|
| | | officialTitleCell.InitUI((int)rankData.value1, (int)rankData.value2);
|
| | | model.Create(HorseManager.Instance.GetOtherPlayerHorseSkinID((int)rankData.value6), (int)rankData.value5, 1);
|
| | |
| | | }
|
| | | #endregion
|
| | |
|
| | | public string GetStoryInfo(uint cmpValue)
|
| | | //获取排名比较值字符串
|
| | | public string GetCmpValueStr(int rankType, uint cmpValue)
|
| | | {
|
| | | int value = (int)cmpValue;
|
| | | if (!MainLevelConfig.HasKey(value))
|
| | | return string.Empty;
|
| | | MainLevelConfig config = MainLevelConfig.Get(value);
|
| | | return Language.Get("Arena15", config.ChapterID, config.LevelNum);
|
| | | switch (rankType)
|
| | | {
|
| | | case 0:
|
| | | case 3:
|
| | | int value = (int)cmpValue;
|
| | | if (!MainLevelConfig.HasKey(value))
|
| | | return string.Empty;
|
| | | MainLevelConfig config = MainLevelConfig.Get(value);
|
| | | return Language.Get("Arena15", config.ChapterID, config.LevelNum);
|
| | | case 4:
|
| | | return cmpValue.ToString();
|
| | | }
|
| | | return string.Empty;
|
| | | }
|
| | |
|
| | | //获取排名标签
|
| | | public string GetCmpTabStr(int rankType)
|
| | | {
|
| | | switch (rankType)
|
| | | {
|
| | | case 0:
|
| | | case 3:
|
| | | return Language.Get("RankTypeName_1");
|
| | | case 4:
|
| | | return Language.Get("OSActivity5");
|
| | | }
|
| | | return string.Empty;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | OrderInfoConfig orderInfoConfig; |
| | | if (model.TryGetOrderInfoConfigByFirstID(firstID, out orderInfoConfig)) |
| | | { |
| | | txtTabTitles[i].text = Language.Get("PayMoneyNum", orderInfoConfig.PayRMBNum); |
| | | txtTabTitles[i].text = Language.Get("PayMoneyNum", orderInfoConfig.PayRMBNumOnSale); |
| | | } |
| | | } |
| | | } |
| | |
| | | bool isBuy = firstChargeData.IsBuy(); |
| | | btnBuy.SetActive(!isBuy); |
| | | btnHave.SetActive(isBuy); |
| | | txtBuy.text = Language.Get("PayMoneyNum", orderInfo.PayRMBNum); |
| | | txtBuy.text = Language.Get("PayMoneyNum", orderInfo.PayRMBNumOnSale); |
| | | //领取 |
| | | int day = firstChargeData.GetNowBuyDay(); |
| | | //0: 已领取 1: 不可领取 2: 可领取 |
| | |
| | | }
|
| | |
|
| | | public const string DJQTip = "DJQTip"; // 代金券提示
|
| | | public const string OSMainLevel = "OSMainLevel"; // 开服主线关卡活动提示
|
| | |
|
| | | public Dictionary<string, int[]> dayRemindDic = new Dictionary<string, int[]>();
|
| | |
|
| | |
| | | private void GetPlayerDayRemind()
|
| | | {
|
| | | SetDayRemind(DJQTip);
|
| | | SetDayRemind(OSMainLevel);
|
| | | }
|
| | |
|
| | | public void SetDayRemind(string _key)
|
| | |
| | | [SerializeField] RightFuncInHome rightFuncInHome; |
| | | |
| | | [SerializeField] Button FirstChargeBtn; |
| | | [SerializeField] Button osMainLevelBtn; |
| | | [SerializeField] Button osHeroCallBtn; |
| | | |
| | | //坐骑 |
| | | [SerializeField] Image horseBGImg; |
| | |
| | | UpdateSendButton(); |
| | | inputFastChat.text = string.Empty; |
| | | }); |
| | | |
| | | osMainLevelBtn.AddListener(() => |
| | | { |
| | | UIManager.Instance.OpenWindow<OSMainLevelBaseWin>(); |
| | | }); |
| | | osHeroCallBtn.AddListener(() => |
| | | { |
| | | UIManager.Instance.OpenWindow<OSHeroCallBaseWin>(); |
| | | }); |
| | | } |
| | | |
| | | |
| | |
| | | HorseManager.Instance.OnHorseUpdateEvent += DisplayHorse; |
| | | ChatManager.Instance.OnChatTabChangeEvent += OnChatTabChangeEvent; |
| | | GuildManager.Instance.EnterOrQuitGuildEvent += EnterOrQuitGuildEvent; |
| | | TimeMgr.Instance.OnDayEvent += OnDayEvent; |
| | | Display(); |
| | | DisplayFirstChargeBtn(); |
| | | DisplayOSActivity(); |
| | | |
| | | // var battleWin = UIManager.Instance.OpenWindow<BattleWin>(); |
| | | // battleWin.SetBattleField(BattleManager.Instance.storyBattleField); |
| | |
| | | HorseManager.Instance.OnHorseUpdateEvent -= DisplayHorse; |
| | | ChatManager.Instance.OnChatTabChangeEvent -= OnChatTabChangeEvent; |
| | | GuildManager.Instance.EnterOrQuitGuildEvent -= EnterOrQuitGuildEvent; |
| | | TimeMgr.Instance.OnDayEvent -= OnDayEvent; |
| | | |
| | | // 关闭的时候把战斗界面也给关了 虽然是在外面开的 |
| | | UIManager.Instance.CloseWindow<BattleWin>(); |
| | |
| | | txtFastChatSend.text = isCanSend ? Language.Get("Chat11") : Language.Get("Chat14", remainingSeconds); |
| | | txtFastChatSend.colorType = isCanSend ? TextColType.NavyBrown : TextColType.LightWhite; |
| | | } |
| | | |
| | | |
| | | |
| | | private void EnterOrQuitGuildEvent(bool obj) |
| | |
| | | |
| | | async UniTask DelayPlayMusic() |
| | | { |
| | | await UniTask.Delay(2000); |
| | | await UniTask.Delay(1200); |
| | | if (!SoundPlayer.Instance.IsPlayBackGroundMuisic()) |
| | | SoundPlayer.Instance.PlayBackGroundMusic(38); |
| | | } |
| | | |
| | | |
| | | |
| | | private void OnClickEnterBoss() |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | private void OnFirstChargeTaskUpdateEvent() |
| | | { |
| | | DisplayFirstChargeBtn(); |
| | |
| | | else if (funcId == (int)FuncOpenEnum.Horse) |
| | | { |
| | | DisplayHorse(); |
| | | } |
| | | else if (funcId == (int)FuncOpenEnum.OSMainLevl || funcId == (int)FuncOpenEnum.OSHeroCall) |
| | | { |
| | | DisplayOSActivity(); |
| | | } |
| | | } |
| | | |
| | |
| | | UIManager.Instance.OpenWindow<HorseWin>(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | void DisplayOSActivity() |
| | | { |
| | | osMainLevelBtn.SetActive(OSActivityManager.Instance.IsOpened(3)); |
| | | osHeroCallBtn.SetActive(OSActivityManager.Instance.IsOpened(4)); |
| | | } |
| | | |
| | | void OnDayEvent() |
| | | { |
| | | DisplayOSActivity(); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | { |
| | | RankModel.Instance.ResetQueryParam(); |
| | | RankModel.Instance.QueryRankByPage(0, watchID: (int)PlayerDatas.Instance.baseData.PlayerID); |
| | | var win = UIManager.Instance.OpenWindow<PlayerRankWin>(); |
| | | win.rankType = 0; |
| | | UIManager.Instance.OpenWindow<PlayerRankWin>(0); |
| | | |
| | | }); |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: c825c294184518b419d9d9fc80996f01 |
| | | folderAsset: yes |
| | | DefaultImporter: |
| | | externalObjects: {} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | |
|
| | |
|
| | | using System;
|
| | | using System.Collections.Generic;
|
| | | using System.Linq;
|
| | | using UnityEngine;
|
| | |
|
| | | public class OSActivityManager : GameSystemManager<OSActivityManager>
|
| | | {
|
| | | Dictionary<int, int[]> rankOpenDays = new Dictionary<int, int[]>(); //排行榜类型:【开始开服天, 结束开服天】
|
| | | public Dictionary<int, int[][]> mainLevelRankAwards = new Dictionary<int, int[][]>(); //主线关卡名次:奖励
|
| | | public Dictionary<int, int[][]> heroCallRankAwards = new Dictionary<int, int[][]>(); //武将招募名次:奖励
|
| | |
|
| | | public List<int> osHeroCallGiftSortList = new List<int>(); //开服招募礼包 充值ID + 100000000
|
| | |
|
| | | Dictionary<int, int> rankTypeToFuncID = new Dictionary<int, int>()
|
| | | {
|
| | | {3, 45},
|
| | | {4, 46},
|
| | | };
|
| | |
|
| | | public override void Init()
|
| | | {
|
| | |
|
| | | DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent += BeforePlayerDataInitialize;
|
| | | StoreModel.Instance.RefreshBuyShopLimitEvent += RefreshStore;
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent += FuncStateChange;
|
| | |
|
| | | ParseConfig();
|
| | | }
|
| | |
|
| | | public override void Release()
|
| | | {
|
| | | DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent -= BeforePlayerDataInitialize;
|
| | | StoreModel.Instance.RefreshBuyShopLimitEvent -= RefreshStore;
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent -= FuncStateChange;
|
| | | }
|
| | |
|
| | | void BeforePlayerDataInitialize()
|
| | | {
|
| | | }
|
| | |
|
| | | void ParseConfig()
|
| | | {
|
| | | var config = FuncConfigConfig.Get("OSABillboard");
|
| | | rankOpenDays = ConfigParse.ParseIntArrayDict(config.Numerical1);
|
| | | mainLevelRankAwards = ConfigParse.ParseIntArray2Dict(config.Numerical2);
|
| | | heroCallRankAwards = ConfigParse.ParseIntArray2Dict(config.Numerical3);
|
| | |
|
| | | var list = StoreModel.Instance.storeTypeDict[(int)StoreFunc.OSHeroCall];
|
| | | var _list = RechargeManager.Instance.GetCTGIDListByType(18);
|
| | |
|
| | | for (int i = 0; i < list.Count; i++)
|
| | | {
|
| | | var item = list[i];
|
| | | osHeroCallGiftSortList.Add(item.shopId);
|
| | | }
|
| | | for (int i = 0; i < _list.Count; i++)
|
| | | {
|
| | | osHeroCallGiftSortList.Add(_list[i] + 100000000);
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | // 开服排行活动是否开启
|
| | | public bool IsOpened(int rankType)
|
| | | {
|
| | | if (!rankTypeToFuncID.ContainsKey(rankType))
|
| | | {
|
| | | return false;
|
| | | }
|
| | |
|
| | | if (!FuncOpen.Instance.IsFuncOpen(rankTypeToFuncID[rankType]))
|
| | | {
|
| | | return false;
|
| | | }
|
| | |
|
| | | //功能开启里有开始天以开启为准,活动结束后延迟一天关闭展示
|
| | | if (!rankOpenDays.ContainsKey(rankType))
|
| | | {
|
| | | return false;
|
| | | }
|
| | |
|
| | | var openDays = rankOpenDays[rankType];
|
| | | if (TimeUtility.OpenDay > openDays[1])
|
| | | {
|
| | | return false;
|
| | | }
|
| | |
|
| | | return true;
|
| | | }
|
| | |
|
| | | public int GetEndTime(int rankType)
|
| | | {
|
| | | if (!rankOpenDays.ContainsKey(rankType))
|
| | | {
|
| | | return 0;
|
| | | }
|
| | | var openDays = rankOpenDays[rankType];
|
| | |
|
| | | return TimeUtility.GetRemindTimeByOpenDay(openDays[1]);
|
| | | }
|
| | |
|
| | | int CmpGift(int a, int b)
|
| | | {
|
| | | bool isSaleOutA = false;
|
| | | bool isSaleOutB = false;
|
| | |
|
| | | if (a < 100000000)
|
| | | {
|
| | | //商店
|
| | | isSaleOutA = StoreModel.Instance.GetShopIDState(a) == 1;
|
| | | }
|
| | | else
|
| | | {
|
| | | RechargeManager.Instance.TryGetRechargeCount(a % 100000000, out RechargeCount countData);
|
| | | if (countData.totalCount >= CTGConfig.Get(a % 100000000).DailyBuyCount)
|
| | | {
|
| | | isSaleOutA = true;
|
| | | }
|
| | | }
|
| | | if (b < 100000000)
|
| | | {
|
| | | isSaleOutB = StoreModel.Instance.GetShopIDState(b) == 1;
|
| | | }
|
| | | else
|
| | | {
|
| | | RechargeManager.Instance.TryGetRechargeCount(b % 100000000, out RechargeCount countData);
|
| | | if (countData.totalCount >= CTGConfig.Get(b % 100000000).DailyBuyCount)
|
| | | {
|
| | | isSaleOutB = true;
|
| | | }
|
| | | }
|
| | | if (isSaleOutA != isSaleOutB)
|
| | | {
|
| | | return isSaleOutA ? 1 : -1;
|
| | | }
|
| | |
|
| | | return a.CompareTo(b);
|
| | | }
|
| | |
|
| | | public void RefreshGiftSortList()
|
| | | {
|
| | | osHeroCallGiftSortList.Sort(CmpGift);
|
| | | }
|
| | |
|
| | | void RefreshStore()
|
| | | {
|
| | | UpdateRedpoint();
|
| | | }
|
| | |
|
| | |
|
| | | Redpoint osMainLevelRedpoint = new Redpoint(MainRedDot.RedPoint_OSMainLevel);
|
| | | Redpoint osHeroCallRedpoint = new Redpoint(MainRedDot.RedPoint_OSHeroCard);
|
| | |
|
| | | public void UpdateRedpoint()
|
| | | {
|
| | | osMainLevelRedpoint.state = !DayRemind.Instance.GetDayRemind(DayRemind.OSMainLevel) ? RedPointState.Simple : RedPointState.None;
|
| | | osHeroCallRedpoint.state = RedPointState.None;
|
| | |
|
| | | if (StoreModel.Instance.freeShopDict.Count == 0) return;
|
| | |
|
| | | if (StoreModel.Instance.freeShopDict.ContainsKey((int)StoreFunc.OSHeroCall))
|
| | | {
|
| | | var shopList = StoreModel.Instance.freeShopDict[(int)StoreFunc.OSHeroCall];
|
| | |
|
| | | for (int i = 0; i < shopList.Count; i++)
|
| | | {
|
| | | var shopID = shopList[i];
|
| | | var config = StoreConfig.Get(shopID);
|
| | | if (StoreModel.Instance.GetShopLimitBuyCount(shopID) < config.LimitCnt)
|
| | | {
|
| | | osHeroCallRedpoint.state = RedPointState.Simple;
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void FuncStateChange(int funcId)
|
| | | {
|
| | | switch ((FuncOpenEnum)funcId)
|
| | | {
|
| | | case FuncOpenEnum.OSMainLevl:
|
| | | case FuncOpenEnum.OSHeroCall:
|
| | | UpdateRedpoint();
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: c7dec13c51efdd541a8b7cfedcdc9d09 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 玩个游戏 |
| | | // [ Date ]: Tuesday, July 24, 2018 |
| | | //-------------------------------------------------------- |
| | | |
| | | |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | |
| | | ////开服活动-武将招募活动 |
| | | public class OSHeroCallBaseWin : FunctionsBaseWin |
| | | { |
| | | [SerializeField] Button closBtn; |
| | | |
| | | protected override void InitComponent() |
| | | { |
| | | base.InitComponent(); |
| | | closBtn.AddListener(CloseWindow); |
| | | } |
| | | |
| | | |
| | | protected override void OpenSubUIByTabIndex() |
| | | { |
| | | switch (functionOrder) |
| | | { |
| | | case 0: |
| | | RankModel.Instance.ResetQueryParam(); |
| | | RankModel.Instance.QueryRankByPage(4, watchID: (int)PlayerDatas.Instance.baseData.PlayerID); |
| | | currentSubUI = UIManager.Instance.OpenWindow<OSRankWin>(4); |
| | | break; |
| | | case 1: |
| | | currentSubUI = UIManager.Instance.OpenWindow<OSRankHeroCallAwardWin>(); |
| | | break; |
| | | case 2: |
| | | currentSubUI = UIManager.Instance.OpenWindow<OSRankHeroCallGiftWin>(); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 625a00313ed577e44b0fc884be1e90f2 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 玩个游戏 |
| | | // [ Date ]: Tuesday, July 24, 2018 |
| | | //-------------------------------------------------------- |
| | | |
| | | |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | |
| | | ////开服活动-主线关卡活动 |
| | | public class OSMainLevelBaseWin : FunctionsBaseWin |
| | | { |
| | | [SerializeField] Button closBtn; |
| | | |
| | | protected override void InitComponent() |
| | | { |
| | | base.InitComponent(); |
| | | closBtn.AddListener(CloseWindow); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | base.OnPreOpen(); |
| | | if (!DayRemind.Instance.GetDayRemind(DayRemind.OSMainLevel)) |
| | | { |
| | | DayRemind.Instance.SetDayRemind(DayRemind.OSMainLevel, true); |
| | | OSActivityManager.Instance.UpdateRedpoint(); |
| | | } |
| | | } |
| | | |
| | | protected override void OpenSubUIByTabIndex() |
| | | { |
| | | switch (functionOrder) |
| | | { |
| | | case 0: |
| | | RankModel.Instance.ResetQueryParam(); |
| | | RankModel.Instance.QueryRankByPage(3, watchID: (int)PlayerDatas.Instance.baseData.PlayerID); |
| | | currentSubUI = UIManager.Instance.OpenWindow<OSRankWin>(3); |
| | | break; |
| | | case 1: |
| | | currentSubUI = UIManager.Instance.OpenWindow<OSRankMainLeveAwardWin>(); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 2e7af1c80e7f0cb4e803121c8107b934 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | public class OSRankHeroCallAwardCell : CellView |
| | | { |
| | | [SerializeField] Text rankText; |
| | | [SerializeField] Image rankImg; |
| | | [SerializeField] ItemCell[] itemCells; |
| | | |
| | | public void Display(int index) |
| | | { |
| | | var rank = index + 1; |
| | | if (index < 3) |
| | | { |
| | | rankImg.SetActive(true); |
| | | rankText.SetActive(false); |
| | | rankImg.SetSprite(StringUtility.Contact("Rank", index + 1)); |
| | | } |
| | | else |
| | | { |
| | | rankImg.SetActive(false); |
| | | rankText.SetActive(true); |
| | | var keys = OSActivityManager.Instance.heroCallRankAwards.Keys.ToList(); |
| | | keys.Sort(); |
| | | var startRank = keys[index - 1] + 1; |
| | | var endRank = keys[index]; |
| | | rank = endRank; |
| | | if (startRank == endRank) |
| | | { |
| | | rankText.text = startRank.ToString(); |
| | | } |
| | | else |
| | | { |
| | | rankText.text = startRank + "-" + endRank; |
| | | } |
| | | } |
| | | |
| | | var award = OSActivityManager.Instance.heroCallRankAwards[rank]; |
| | | for (int i = 0; i < itemCells.Length; i++) |
| | | { |
| | | var itemCell = itemCells[i]; |
| | | if (i < award.Length) |
| | | { |
| | | itemCell.SetActive(true); |
| | | int itemID = award[i][0]; |
| | | itemCell.Init(new ItemCellModel(itemID, true, award[i][1])); |
| | | itemCell.button.SetListener(() => ItemTipUtility.Show(itemID)); |
| | | } |
| | | else |
| | | { |
| | | itemCell.SetActive(false); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 3efefc256362c9e4a9538ad84e522737 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 玩个游戏 |
| | | // [ Date ]: Tuesday, July 24, 2018 |
| | | //-------------------------------------------------------- |
| | | |
| | | |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | |
| | | ////开服活动-武将招募排行榜奖励 |
| | | public class OSRankHeroCallAwardWin : UIBase |
| | | { |
| | | [SerializeField] ScrollerController scrollerController; |
| | | [SerializeField] Text myRankText; |
| | | [SerializeField] Text myRankValueText; |
| | | |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | scrollerController.OnRefreshCell += OnRefreshCell; |
| | | CreateScroller(); |
| | | DisplayMyRank(4); |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | scrollerController.OnRefreshCell -= OnRefreshCell; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | void CreateScroller() |
| | | { |
| | | var keys = OSActivityManager.Instance.heroCallRankAwards.Keys; |
| | | |
| | | scrollerController.Refresh(); |
| | | for (int i = 0; i < keys.Count; i++) |
| | | { |
| | | scrollerController.AddCell(ScrollerDataType.Header, i); |
| | | } |
| | | scrollerController.Restart(); |
| | | } |
| | | |
| | | void OnRefreshCell(ScrollerDataType type, CellView cell) |
| | | { |
| | | var _cell = cell.GetComponent<OSRankHeroCallAwardCell>(); |
| | | _cell.Display(cell.index); |
| | | } |
| | | |
| | | public void DisplayMyRank(int rankType) |
| | | { |
| | | RankData rankData = null; |
| | | rankData = RankModel.Instance.GetMyRank(rankType); |
| | | if (rankData == null) |
| | | { |
| | | myRankText.text = Language.Get("L1045"); |
| | | myRankValueText.text = "";//Language.Get("L1125"); |
| | | return; |
| | | } |
| | | int rank = rankData.rank; |
| | | |
| | | if (rankData == null) |
| | | { |
| | | myRankValueText.text = "";//Language.Get("L1125"); |
| | | } |
| | | else |
| | | { |
| | | myRankValueText.text = RankModel.Instance.GetCmpValueStr(rankType, rankData.cmpValue); ; |
| | | } |
| | | |
| | | myRankText.text = Language.Get("L1126") + Language.Get("L1096") + rank.ToString(); |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 4c95333a39a8daa4da8ab42140cda281 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | public class OSRankHeroCallGiftCell : CellView |
| | | { |
| | | [SerializeField] Text nameText; |
| | | [SerializeField] ItemCell[] itemCells; |
| | | [SerializeField] Button buyBtn; |
| | | [SerializeField] Text moneyText; |
| | | [SerializeField] Image moneyIcon; |
| | | [SerializeField] Transform saleOutRect; |
| | | [SerializeField] Image redImg; |
| | | [SerializeField] Text buyLimitText; |
| | | [SerializeField] Image maskImg; |
| | | |
| | | public void Display(int index) |
| | | { |
| | | var id = OSActivityManager.Instance.osHeroCallGiftSortList[index]; |
| | | if (id > 100000000) |
| | | { |
| | | //充值 |
| | | id -= 100000000; |
| | | var ctgConfig = CTGConfig.Get(id); |
| | | nameText.text = ctgConfig.Title; |
| | | for (int i = 0; i < itemCells.Length; i++) |
| | | { |
| | | var itemCell = itemCells[i]; |
| | | if (i < ctgConfig.GainItemList.Length) |
| | | { |
| | | itemCell.SetActive(true); |
| | | int itemID = ctgConfig.GainItemList[i][0]; |
| | | itemCell.Init(new ItemCellModel(itemID, true, ctgConfig.GainItemList[i][1])); |
| | | itemCell.button.SetListener(() => ItemTipUtility.Show(itemID)); |
| | | } |
| | | else |
| | | { |
| | | itemCell.SetActive(false); |
| | | } |
| | | } |
| | | RechargeManager.Instance.TryGetRechargeCount(id, out var rechargeCount); |
| | | var limitCnt = ctgConfig.DailyBuyCount; |
| | | if (rechargeCount.todayCount < limitCnt) |
| | | { |
| | | saleOutRect.SetActive(false); |
| | | maskImg.SetActive(false); |
| | | buyBtn.SetActive(true); |
| | | buyBtn.SetListener(() => |
| | | { |
| | | RechargeManager.Instance.CTG(id); |
| | | }); |
| | | |
| | | RechargeManager.Instance.TryGetOrderInfo(id, out var orderInfo); |
| | | |
| | | moneyText.text = Language.Get("PayMoneyNum", orderInfo.PayRMBNumOnSale); |
| | | moneyIcon.SetActive(false); |
| | | } |
| | | else |
| | | { |
| | | saleOutRect.SetActive(true); |
| | | maskImg.SetActive(true); |
| | | buyBtn.SetActive(false); |
| | | } |
| | | buyLimitText.text = Language.Get("storename6", limitCnt - rechargeCount.todayCount, limitCnt); |
| | | redImg.SetActive(false); |
| | | |
| | | } |
| | | else |
| | | { |
| | | //商店 |
| | | var storeConfig = StoreConfig.Get(id); |
| | | nameText.text = storeConfig.Name; |
| | | var awards = StoreModel.Instance.GetShopItemlistEx(storeConfig); |
| | | for (int i = 0; i < itemCells.Length; i++) |
| | | { |
| | | var itemCell = itemCells[i]; |
| | | if (i < awards.Count) |
| | | { |
| | | itemCell.SetActive(true); |
| | | int itemID = awards[i][0]; |
| | | itemCell.Init(new ItemCellModel(itemID, true, awards[i][1])); |
| | | itemCell.button.SetListener(() => ItemTipUtility.Show(itemID)); |
| | | } |
| | | else |
| | | { |
| | | itemCell.SetActive(false); |
| | | } |
| | | } |
| | | |
| | | var state = StoreModel.Instance.GetShopIDState(id); |
| | | if (state == 1) |
| | | { |
| | | saleOutRect.SetActive(true); |
| | | maskImg.SetActive(true); |
| | | buyBtn.SetActive(false); |
| | | redImg.SetActive(false); |
| | | } |
| | | else |
| | | { |
| | | saleOutRect.SetActive(false); |
| | | maskImg.SetActive(false); |
| | | buyBtn.SetActive(true); |
| | | buyBtn.SetListener(() => |
| | | { |
| | | StoreModel.Instance.SendBuyShopItemWithPopCheck(storeConfig, 1); |
| | | }); |
| | | moneyText.text = storeConfig.MoneyNum == 0 ? Language.Get("L1127") : storeConfig.MoneyNum.ToString(); |
| | | moneyIcon.SetActive(storeConfig.MoneyNum != 0); |
| | | moneyIcon.SetIconWithMoneyType(storeConfig.MoneyType); |
| | | redImg.SetActive(storeConfig.MoneyNum == 0); |
| | | } |
| | | var buyCnt = StoreModel.Instance.GetShopLimitBuyCount(id); |
| | | buyLimitText.text = Language.Get("storename6", storeConfig.LimitCnt - buyCnt, storeConfig.LimitCnt); |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 002c4b8249e5e3c419d7146aaaa716b9 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 玩个游戏 |
| | | // [ Date ]: Tuesday, July 24, 2018 |
| | | //-------------------------------------------------------- |
| | | |
| | | |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | |
| | | //开服活动-武将招募礼包 |
| | | public class OSRankHeroCallGiftWin : UIBase |
| | | { |
| | | [SerializeField] ScrollerController scrollerController; |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | scrollerController.OnRefreshCell += OnRefreshCell; |
| | | StoreModel.Instance.RefreshBuyShopLimitEvent += RefreshStore; |
| | | RechargeManager.Instance.rechargeCountEvent += OnRechargeCountEvent; |
| | | OSActivityManager.Instance.RefreshGiftSortList(); |
| | | Display(); |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | scrollerController.OnRefreshCell -= OnRefreshCell; |
| | | StoreModel.Instance.RefreshBuyShopLimitEvent -= RefreshStore; |
| | | RechargeManager.Instance.rechargeCountEvent -= OnRechargeCountEvent; |
| | | } |
| | | |
| | | void OnRefreshCell(ScrollerDataType type, CellView cell) |
| | | { |
| | | var _cell = cell as OSRankHeroCallGiftCell; |
| | | _cell.Display(cell.index); |
| | | } |
| | | |
| | | void Display() |
| | | { |
| | | scrollerController.Refresh(); |
| | | for (int i = 0; i < OSActivityManager.Instance.osHeroCallGiftSortList.Count; i++) |
| | | { |
| | | scrollerController.AddCell(ScrollerDataType.Header, i); |
| | | } |
| | | scrollerController.Restart(); |
| | | |
| | | } |
| | | |
| | | void RefreshStore() |
| | | { |
| | | scrollerController.m_Scorller.RefreshActiveCellViews(); |
| | | } |
| | | |
| | | void OnRechargeCountEvent(int id) |
| | | { |
| | | scrollerController.m_Scorller.RefreshActiveCellViews(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: a2f6ca07e3517cf4aac0abab1ce8a454 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | public class OSRankMainLeveAwardCell : CellView |
| | | { |
| | | [SerializeField] Text rankText; |
| | | [SerializeField] Image rankImg; |
| | | [SerializeField] ItemCell[] itemCells; |
| | | |
| | | public void Display(int index) |
| | | { |
| | | var rank = index + 1; |
| | | if (index < 3) |
| | | { |
| | | rankImg.SetActive(true); |
| | | rankText.SetActive(false); |
| | | rankImg.SetSprite(StringUtility.Contact("Rank", index + 1)); |
| | | } |
| | | else |
| | | { |
| | | rankImg.SetActive(false); |
| | | rankText.SetActive(true); |
| | | var keys = OSActivityManager.Instance.mainLevelRankAwards.Keys.ToList(); |
| | | keys.Sort(); |
| | | var startRank = keys[index - 1] + 1; |
| | | var endRank = keys[index]; |
| | | rank = endRank; |
| | | if (startRank == endRank) |
| | | { |
| | | rankText.text = startRank.ToString(); |
| | | } |
| | | else |
| | | { |
| | | rankText.text = startRank + "-" + endRank; |
| | | } |
| | | } |
| | | |
| | | var award = OSActivityManager.Instance.mainLevelRankAwards[rank]; |
| | | for (int i = 0; i < itemCells.Length; i++) |
| | | { |
| | | var itemCell = itemCells[i]; |
| | | if (i < award.Length) |
| | | { |
| | | itemCell.SetActive(true); |
| | | int itemID = award[i][0]; |
| | | itemCell.Init(new ItemCellModel(itemID, true, award[i][1])); |
| | | itemCell.button.SetListener(() => ItemTipUtility.Show(itemID)); |
| | | } |
| | | else |
| | | { |
| | | itemCell.SetActive(false); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: c7c89cdc2160945468c6bc1420bbf405 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 玩个游戏 |
| | | // [ Date ]: Tuesday, July 24, 2018 |
| | | //-------------------------------------------------------- |
| | | |
| | | |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | |
| | | //开服活动-主线关卡排行奖励 |
| | | public class OSRankMainLeveAwardWin : UIBase |
| | | { |
| | | [SerializeField] ScrollerController scrollerController; |
| | | [SerializeField] Text myRankText; |
| | | [SerializeField] Text myRankValueText; |
| | | |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | scrollerController.OnRefreshCell += OnRefreshCell; |
| | | CreateScroller(); |
| | | DisplayMyRank(3); |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | scrollerController.OnRefreshCell -= OnRefreshCell; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | void CreateScroller() |
| | | { |
| | | var keys = OSActivityManager.Instance.mainLevelRankAwards.Keys; |
| | | |
| | | scrollerController.Refresh(); |
| | | for (int i = 0; i < keys.Count; i++) |
| | | { |
| | | scrollerController.AddCell(ScrollerDataType.Header, i); |
| | | } |
| | | scrollerController.Restart(); |
| | | } |
| | | |
| | | void OnRefreshCell(ScrollerDataType type, CellView cell) |
| | | { |
| | | var _cell = cell.GetComponent<OSRankMainLeveAwardCell>(); |
| | | _cell.Display(cell.index); |
| | | } |
| | | |
| | | public void DisplayMyRank(int rankType) |
| | | { |
| | | RankData rankData = null; |
| | | rankData = RankModel.Instance.GetMyRank(rankType); |
| | | if (rankData == null) |
| | | { |
| | | myRankText.text = Language.Get("L1045"); |
| | | myRankValueText.text = "";//Language.Get("L1125"); |
| | | return; |
| | | } |
| | | int rank = rankData.rank; |
| | | |
| | | if (rankData == null) |
| | | { |
| | | myRankValueText.text = "";//Language.Get("L1125"); |
| | | } |
| | | else |
| | | { |
| | | myRankValueText.text = RankModel.Instance.GetCmpValueStr(rankType, rankData.cmpValue); ; |
| | | } |
| | | |
| | | myRankText.text = Language.Get("L1126") + Language.Get("L1096") + rank.ToString(); |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 70dab80b73c888a4f9342841075f2c98 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 玩个游戏 |
| | | // [ Date ]: Tuesday, July 24, 2018 |
| | | //-------------------------------------------------------- |
| | | |
| | | |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | |
| | | //开服活动-排行榜 3 - 开服关卡榜 ; 4 - 开服招募榜 |
| | | public class OSRankWin : PlayerRankWin |
| | | { |
| | | |
| | | [SerializeField] Text timeText; |
| | | [SerializeField] Text overTimeText; |
| | | |
| | | |
| | | |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | base.OnPreOpen(); |
| | | GlobalTimeEvent.Instance.secondEvent += OnSecond; |
| | | ShowTime(); |
| | | |
| | | } |
| | | |
| | | void ShowTime() |
| | | { |
| | | var seconds = OSActivityManager.Instance.GetEndTime(rankType); |
| | | if (seconds > 0) |
| | | { |
| | | timeText.SetActive(true); |
| | | overTimeText.SetActive(false); |
| | | timeText.text = TimeUtility.SecondsToShortDHMS(seconds); |
| | | } |
| | | else |
| | | { |
| | | timeText.SetActive(false); |
| | | overTimeText.SetActive(true); |
| | | } |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | base.OnPreClose(); |
| | | GlobalTimeEvent.Instance.secondEvent -= OnSecond; |
| | | } |
| | | |
| | | void OnSecond() |
| | | { |
| | | ShowTime(); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 0a29b5ea6f0229e45afdfecebbab816e |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | |
|
| | | public class StoreModel : GameSystemManager<StoreModel>
|
| | | {
|
| | | public Dictionary<int, List<StoreData>> storeTypeDict { get; private set; } //所有显示商品
|
| | | public Dictionary<int, List<StoreData>> storeTypeDict { get; private set; } //所有显示商品 商店类型:商品列表
|
| | | public Dictionary<int, int> shopRefreshCntDict = new Dictionary<int, int>(); //刷新次数
|
| | | private Dictionary<int, int> shopItemlimitDict = new Dictionary<int, int>(); //已购买次数
|
| | | public event Action RefreshBuyShopLimitEvent;
|
| | |
| | | public int heroSoulRefreshMoney;
|
| | | public int heroSoulRefreshFreeCount;
|
| | |
|
| | | Dictionary<int, List<int>> freeShopDict = new Dictionary<int, List<int>>();
|
| | | public Dictionary<int, List<int>> freeShopDict = new Dictionary<int, List<int>>(); //免费商品 商店类型:商品列表
|
| | | public Dictionary<int, int> shopMoneyTypeDict = new Dictionary<int, int>();
|
| | |
|
| | | public override void Init()
|
| | |
| | |
|
| | | if (storeConfig.ItemID != 0)
|
| | | {
|
| | | ShopItemInfo shopItem = new ShopItemInfo(storeConfig.ID, storeConfig.ItemCnt);
|
| | | ShopItemInfo shopItem = new ShopItemInfo(storeConfig.ItemID, storeConfig.ItemCnt);
|
| | | shopItemlist.Add(shopItem);
|
| | | }
|
| | | var extraItem = storeConfig.ItemListEx;
|
| | |
| | | List<int[]> shopItemlist = new List<int[]>();
|
| | | if (storeConfig.ItemID != 0)
|
| | | {
|
| | | shopItemlist.Add(new int[] { storeConfig.ID, storeConfig.ItemCnt});
|
| | | shopItemlist.Add(new int[] { storeConfig.ItemID, storeConfig.ItemCnt});
|
| | | }
|
| | | var extraItem = storeConfig.ItemListEx;
|
| | | for (int i = 0; i < extraItem.Length; i++)
|
| | |
| | |
|
| | | }
|
| | |
|
| | | //仙玉购买物品的二次确认框,一级货币只有仙玉 默认为仙玉即可
|
| | | //货币购买的二次确认框的确认记录
|
| | | Dictionary<int, bool> buyItemCheckDict = new Dictionary<int, bool>(); //记录勾选信息
|
| | | |
| | | //购买商店物品的二次确认框
|
| | | //eventType 二次确认框类型,对应枚举 BuyStoreItemCheckType
|
| | | public void SendBuyShopItemWithPopCheck(StoreConfig model, int count, int eventType = 0)
|
| | | {
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | ConfirmCancel.ToggleConfirmCancel(Language.Get("Mail101"), Language.Get("CostMoney", model.MoneyNum, model.MoneyType),
|
| | | ConfirmCancel.ToggleConfirmCancel(Language.Get("Mail101"), Language.Get("BuyStoreItem", model.MoneyNum, model.MoneyType, model.Name),
|
| | | Language.Get("ConfirmCancel102"), (bool isOk, bool isToggle) =>
|
| | | {
|
| | | if (isOk)
|
| | |
| | | Normal = 1, //1:坊市
|
| | | Guild = 2, //2:公会
|
| | | Hero = 3, //3:将魂
|
| | | |
| | | OSHeroCall = 4, //4:开服招募礼包
|
| | |
|
| | | }
|
| | |
|
| | |
|