Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Thursday, November 15, 2018 |
| | | //-------------------------------------------------------- |
| | | |
| | | using UnityEngine; |
| | | using System; |
| | | |
| | | namespace TableConfig { |
| | | |
| | | |
| | | public partial class IceLodeStarAwardConfig : ConfigBase { |
| | | |
| | | public int id { get ; private set ; }
|
| | | public int index { get ; private set ; }
|
| | | public int Star { get ; private set ; }
|
| | | public string LV { get ; private set; } |
| | | public string ItemList { get ; private set; } |
| | | public int Type { get ; private set ; } |
| | | |
| | | public override string getKey() |
| | | { |
| | | return id.ToString(); |
| | | } |
| | | |
| | | public override void Parse() { |
| | | try |
| | | { |
| | | id=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; |
| | | |
| | | index=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0; |
| | | |
| | | Star=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0; |
| | | |
| | | LV = rawContents[3].Trim();
|
| | | |
| | | ItemList = rawContents[4].Trim();
|
| | | |
| | | Type=IsNumeric(rawContents[5]) ? int.Parse(rawContents[5]):0; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | DebugEx.Log(ex); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: b18277562fc6e994c906d41cb5c14c5b |
| | | timeCreated: 1542267230 |
| | | licenseType: Free |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Thursday, November 15, 2018 |
| | | //-------------------------------------------------------- |
| | | |
| | | using UnityEngine; |
| | | using System; |
| | | |
| | | namespace TableConfig { |
| | | |
| | | |
| | | public partial class LoadingBackGroundConfig : ConfigBase { |
| | | |
| | | public int id { get ; private set ; } |
| | | public string[] icons; |
| | | public string levelLimit { get ; private set; } |
| | | public string name { get ; private set; } |
| | | public string description { get ; private set; } |
| | | |
| | | public override string getKey() |
| | | { |
| | | return id.ToString(); |
| | | } |
| | | |
| | | public override void Parse() { |
| | | try |
| | | { |
| | | id=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; |
| | | |
| | | icons = rawContents[1].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | |
| | | levelLimit = rawContents[2].Trim(); |
| | | |
| | | name = rawContents[3].Trim(); |
| | | |
| | | description = rawContents[4].Trim(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | DebugEx.Log(ex); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 791645468791ce74c84280782740fa99 |
| | | timeCreated: 1542267123 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Friday, May 18, 2018 |
| | | //-------------------------------------------------------- |
| | | |
| | | using UnityEngine; |
| | | using System; |
| | | |
| | | namespace TableConfig { |
| | | |
| | | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Thursday, November 15, 2018
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using UnityEngine;
|
| | | using System;
|
| | |
|
| | | namespace TableConfig {
|
| | |
|
| | | |
| | | public partial class MapResourcesConfig : ConfigBase {
|
| | |
|
| | | public int ID { get ; private set ; }
|
| | |
| | | public Vector3 MapOffset { get ; private set; }
|
| | | public int[] Effect;
|
| | | public int Music { get ; private set ; }
|
| | | public string[] LoadingBG;
|
| | | public string LoadName { get ; private set; } |
| | | public string LoadDescription { get ; private set; } |
| | | public int ShowBOSSTime { get ; private set ; }
|
| | | |
| | |
|
| | | public override string getKey()
|
| | | {
|
| | | return ID.ToString();
|
| | | } |
| | | |
| | | public override void Parse() { |
| | | }
|
| | |
|
| | | public override void Parse() {
|
| | | try
|
| | | {
|
| | | ID=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0;
|
| | |
| | |
|
| | | Music=IsNumeric(rawContents[10]) ? int.Parse(rawContents[10]):0;
|
| | |
|
| | | LoadingBG = rawContents[11].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
|
| | | |
| | | LoadName = rawContents[12].Trim();
|
| | | |
| | | LoadDescription = rawContents[13].Trim();
|
| | | |
| | | ShowBOSSTime=IsNumeric(rawContents[14]) ? int.Parse(rawContents[14]):0; |
| | | ShowBOSSTime=IsNumeric(rawContents[11]) ? int.Parse(rawContents[11]):0; |
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | | DebugEx.Log(ex);
|
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | }
|
| | | }
|
| | | |
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
| | | fileFormatVersion: 2 |
| | | guid: 8f17a96ef841bb74dafcec974bb4e7f5 |
| | | timeCreated: 1526625853 |
| | | timeCreated: 1542269954 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | AddAsyncTask<GuardConfig>();
|
| | | AddAsyncTask<MarketQueryConfig>();
|
| | | AddAsyncTask<TreasureDungeonConfig>();
|
| | | AddAsyncTask<LoadingBackGroundConfig>();
|
| | | AddAsyncTask<IceLodeStarAwardConfig>();
|
| | |
|
| | | while (!AllCompleted())
|
| | | {
|
| | | var completedCount = 0;
|
| | |
| | | {
|
| | | private static Dictionary<StoreItem, StoreConfig> s_StoreItemDict = new Dictionary<StoreItem, StoreConfig>();
|
| | | private static Dictionary<int, List<StoreConfig>> storeConfigs = new Dictionary<int, List<StoreConfig>>();
|
| | |
|
| | | static readonly int[] shop1Types = new int[] { 2, 3 };
|
| | | static readonly int[] shop2Types = new int[] { 4 };
|
| | | public void OnConfigParseCompleted()
|
| | | {
|
| | | if (ShopType == 0) return;
|
| | |
|
| | | var _storeItem = new StoreItem()
|
| | | {
|
| | | shopType = this.ShopType,
|
| | | item = this.ItemID,
|
| | | type = this.MoneyType,
|
| | | };
|
| | |
| | | list.Add(this);
|
| | | }
|
| | |
|
| | | public static StoreConfig GetStoreCfg(int _item, int _moneyType)
|
| | | public static StoreConfig GetStoreCfg(int _item, int _moneyType, int shopType = 0)
|
| | | {
|
| | | var _storeItem = new StoreItem()
|
| | | if (shopType != 0)
|
| | | {
|
| | | item = _item,
|
| | | type = _moneyType,
|
| | | };
|
| | | if (s_StoreItemDict.ContainsKey(_storeItem))
|
| | | var storeItem = new StoreItem()
|
| | | {
|
| | | item = _item,
|
| | | type = _moneyType,
|
| | | shopType = shopType,
|
| | | };
|
| | | if (s_StoreItemDict.ContainsKey(storeItem))
|
| | | {
|
| | | return s_StoreItemDict[storeItem];
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | return s_StoreItemDict[_storeItem];
|
| | | switch (_moneyType)
|
| | | {
|
| | | case 1:
|
| | | {
|
| | | for (int i = 0; i < shop1Types.Length; i++)
|
| | | {
|
| | | var storeItem = new StoreItem()
|
| | | {
|
| | | item = _item,
|
| | | type = _moneyType,
|
| | | shopType = shop1Types[i],
|
| | | };
|
| | | if (s_StoreItemDict.ContainsKey(storeItem))
|
| | | {
|
| | | return s_StoreItemDict[storeItem];
|
| | | }
|
| | | }
|
| | | }
|
| | | break;
|
| | | case 2:
|
| | | {
|
| | | for (int i = 0; i < shop2Types.Length; i++)
|
| | | {
|
| | | var storeItem = new StoreItem()
|
| | | {
|
| | | item = _item,
|
| | | type = _moneyType,
|
| | | shopType = shop2Types[i],
|
| | | };
|
| | | if (s_StoreItemDict.ContainsKey(storeItem))
|
| | | {
|
| | | return s_StoreItemDict[storeItem];
|
| | | }
|
| | | }
|
| | | }
|
| | | break;
|
| | | }
|
| | | }
|
| | | return null;
|
| | | }
|
| | |
| | |
|
| | | public struct StoreItem
|
| | | {
|
| | | public int shopType;
|
| | | public int item;
|
| | | public int type;
|
| | |
|
| | | public override bool Equals(object x)
|
| | | {
|
| | | StoreItem _storeItem = (StoreItem)x;
|
| | | return this.item == _storeItem.item && this.type == _storeItem.type;
|
| | | return this.item == _storeItem.item && this.type == _storeItem.type && this.shopType == _storeItem.shopType;
|
| | | }
|
| | |
|
| | | public override int GetHashCode()
|
| | |
| | | switch (info.BossType)
|
| | | {
|
| | | case 0:
|
| | | worldBossModel.wearyValue = info.KillCnt;
|
| | | worldBossModel.extraBossWearyValue = info.ItemAddCnt;
|
| | | worldBossModel.wearyValue = (int)info.KillCnt;
|
| | | worldBossModel.extraBossWearyValue = (int)info.ItemAddCnt;
|
| | | break;
|
| | | case 2:
|
| | | dogzDungeonModel.wearyValue = info.KillCnt;
|
| | | dogzDungeonModel.wearyValue = (int)info.KillCnt;
|
| | | break;
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | KillCntInfoList[i] = new tagMCBossCntInfo();
|
| | | TransBytes(out KillCntInfoList[i].BossType, vBytes, NetDataType.BYTE);
|
| | | TransBytes(out KillCntInfoList[i].KillCnt, vBytes, NetDataType.BYTE);
|
| | | TransBytes(out KillCntInfoList[i].ItemAddCnt, vBytes, NetDataType.BYTE);
|
| | | TransBytes(out KillCntInfoList[i].KillCnt, vBytes, NetDataType.DWORD);
|
| | | TransBytes(out KillCntInfoList[i].ItemAddCnt, vBytes, NetDataType.DWORD);
|
| | | }
|
| | | }
|
| | |
|
| | | public struct tagMCBossCntInfo
|
| | | {
|
| | | public byte BossType; //编号类型0-世界boss 1-boss之家
|
| | | public byte KillCnt; //击杀次数
|
| | | public byte ItemAddCnt; //物品增加次数
|
| | | public uint KillCnt; //击杀次数
|
| | | public uint ItemAddCnt; //物品增加次数
|
| | | }
|
| | |
|
| | | } |
| | |
| | | [SerializeField] PropertyBehaviour[] m_Propertys;
|
| | | [SerializeField] Button m_ChallengeNextLevel;
|
| | |
|
| | | public static event Action challengeNextEvent;
|
| | |
|
| | | TreasureModel model
|
| | | {
|
| | | get { return ModelCenter.Instance.GetModel<TreasureModel>(); }
|
| | |
| | | {
|
| | | m_Propertys[index].gameObject.SetActive(true);
|
| | | m_Propertys[index].Display(key, propertyDict[key]);
|
| | | index++;
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | pak.ActionType = 0;
|
| | | pak.ActionInfo = 0;
|
| | | GameNetSystem.Instance.SendInfo(pak);
|
| | | dungeonModel.UpdateCoolDown(DungeonCoolDownType.LeaveMap, 0);
|
| | | dungeonModel.UpdateCoolDown(DungeonCoolDownType.TowerTake, 0);
|
| | | CloseClick();
|
| | | if (challengeNextEvent != null)
|
| | | {
|
| | | challengeNextEvent();
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | [SerializeField] GameObject gradeContainer;
|
| | | [SerializeField] GameObject expContainer;
|
| | | [SerializeField] RectTransform[] moveRects;
|
| | |
|
| | | DateTime endTime;
|
| | | DateTime dungeonEndTime;
|
| | |
|
| | | [SerializeField] RectTransform[] moveRects;
|
| | |
|
| | | private bool isCanContinue = true;
|
| | | private bool exitDungeonStage = false;
|
| | |
|
| | | private DungeonModel model
|
| | | {
|
| | |
| | | SetTween(gradePosTween, gradeScaleTween, 0);
|
| | | SetTween(expPosTween, expScaleTween, 0);
|
| | |
|
| | | dungeonEndTime = model.GetCoolDownEndTime(DungeonCoolDownType.TowerTake);
|
| | | endTime = model.GetCoolDownEndTime(DungeonCoolDownType.FlagTake);
|
| | | expContainer.SetActive(false);
|
| | |
|
| | | isCanContinue = true;
|
| | | dungeonEndTime = model.GetCoolDownEndTime(DungeonCoolDownType.TowerTake);
|
| | | endTime = model.GetCoolDownEndTime(DungeonCoolDownType.FlagTake);
|
| | | var exitTime = model.GetCoolDownEndTime(DungeonCoolDownType.LeaveMap);
|
| | | exitDungeonStage = exitTime > DateTime.Now;
|
| | | if (exitDungeonStage)
|
| | | {
|
| | | DungeonCoolDownEvent(DungeonCoolDownType.LeaveMap);
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnEnable()
|
| | |
| | | endTime = model.GetCoolDownEndTime(type);
|
| | | break;
|
| | | case DungeonCoolDownType.LeaveMap:
|
| | | if (isCanContinue)
|
| | | {
|
| | | surplusTime.text = Language.Get("DungeonGrade_5", GetStar(model.mission.grade));
|
| | | }
|
| | | isCanContinue = false;
|
| | | surplusTime.text = Language.Get("DungeonGrade_5", GetStar(model.mission.grade));
|
| | | exitDungeonStage = true;
|
| | | break;
|
| | | }
|
| | | }
|
| | |
| | | protected override void LateUpdate()
|
| | | {
|
| | | base.LateUpdate();
|
| | | if (isCanContinue)
|
| | | if (!exitDungeonStage)
|
| | | {
|
| | | if (model.mission.grade > 1)
|
| | | {
|
| | |
| | | surplusTime.text = Language.Get("DungeonGrade_4", TimeUtility.SecondsToHMSCHSRetain((int)surplus.TotalSeconds, false, false));
|
| | | if (surplus.Equals(TimeSpan.Zero))
|
| | | {
|
| | | isCanContinue = false;
|
| | | exitDungeonStage = true;
|
| | | surplusTime.text = Language.Get("DungeonGrade_1");
|
| | | }
|
| | | }
|
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Thursday, November 15, 2018 |
| | | //-------------------------------------------------------- |
| | | //冰晶矿脉新 |
| | | using System;
|
| | | using System.Collections.Generic;
|
| | | using TableConfig;
|
| | | using Snxxz.UI; |
| | | |
| | | |
| | | [XLua.LuaCallCSharp]
|
| | | public class IceLodeStarAwardClass
|
| | | {
|
| | | public int Index;
|
| | | public int Star;
|
| | | public int MinLv;
|
| | | public int MaxLv;
|
| | | public int ItemID;
|
| | | public int ItemCount;
|
| | | public int IsBind;
|
| | | public int Type;
|
| | |
|
| | | }
|
| | | public class IceCrystalVeinModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
|
| | | {
|
| | | public Dictionary<int, IceLodeStarAwardClass> DicIceLodeStarAward = new Dictionary<int, IceLodeStarAwardClass>();
|
| | |
|
| | | public override void Init()
|
| | | {
|
| | | Assignment();
|
| | | }
|
| | | public void OnBeforePlayerDataInitialize()
|
| | | {
|
| | | |
| | | }
|
| | | public override void UnInit()
|
| | | {
|
| | | |
| | | }
|
| | | public void OnPlayerLoginOk()
|
| | | {
|
| | | |
| | | }
|
| | |
|
| | | private void Assignment()
|
| | | {
|
| | | if (DicIceLodeStarAward.Count <= 0)
|
| | | {
|
| | | var config = Config.Instance.GetAllValues<IceLodeStarAwardConfig>();
|
| | | foreach (var Value in config)
|
| | | {
|
| | | if (!DicIceLodeStarAward.ContainsKey(Value.id))
|
| | | {
|
| | | IceLodeStarAwardClass iceLodeStar = new IceLodeStarAwardClass();
|
| | | iceLodeStar.Index = Value.index;
|
| | | iceLodeStar.Star = Value.Star;
|
| | | var _jsonData = LitJson.JsonMapper.ToObject(Value.LV);
|
| | | if (_jsonData.Count > 0)
|
| | | {
|
| | | iceLodeStar.MinLv = int.Parse(_jsonData[0].ToString());
|
| | | iceLodeStar.MaxLv = int.Parse(_jsonData[1].ToString());
|
| | | }
|
| | | var jsonData = LitJson.JsonMapper.ToObject(Value.ItemList);
|
| | | if (jsonData.Count > 0)
|
| | | {
|
| | | iceLodeStar.ItemID = int.Parse((jsonData[0][0]).ToString());
|
| | | iceLodeStar.ItemCount = int.Parse((jsonData[0][1]).ToString());
|
| | | iceLodeStar.IsBind = int.Parse((jsonData[0][2]).ToString());
|
| | | }
|
| | | iceLodeStar.Type = Value.Type;
|
| | | DicIceLodeStarAward.Add(Value.id, iceLodeStar);
|
| | | }
|
| | | }
|
| | | }
|
| | | |
| | | |
| | | }
|
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 60541ff2122967249beb1f30d9fdd254 |
| | | timeCreated: 1542267471 |
| | | licenseType: Free |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | [SerializeField] Transform m_GridMiddle;//中间组 |
| | | [SerializeField] Transform m_GridBottom;//底层组 |
| | | ItemTipsModel _itemTipsModel;
|
| | | ItemTipsModel itemTipsModel { get { return _itemTipsModel ?? (_itemTipsModel = ModelCenter.Instance.GetModel<ItemTipsModel>()); } } |
| | | ItemTipsModel itemTipsModel { get { return _itemTipsModel ?? (_itemTipsModel = ModelCenter.Instance.GetModel<ItemTipsModel>()); } }
|
| | | IceCrystalVeinModel m_IceCrystalVeinModel; |
| | | IceCrystalVeinModel iceCrystalVeinModel { get { return m_IceCrystalVeinModel ?? (m_IceCrystalVeinModel = ModelCenter.Instance.GetModel<IceCrystalVeinModel>()); } }
|
| | | private int IndexSelect = 1; |
| | | private List<int> IceCrystalVeinMiddle = new List<int>(); |
| | | private List<int> IceCrystalVeinStarBottom = new List<int>();
|
| | | private List<int> IceCrystalVeinBottom = new List<int>(); |
| | | private List<IceLodeStarAwardClass> IceLodeStarAwardList = new List<IceLodeStarAwardClass>(); |
| | | #region Built-in |
| | | protected override void BindController() |
| | | {
|
| | |
| | | for (int i = 0; i < IceCrystalVeinReward.Length; i++)
|
| | | {
|
| | | IceCrystalVeinMiddle.Add(IceCrystalVeinReward[i]);
|
| | | } |
| | | var _IceCrystalVeinStarReward = Config.Instance.Get<FuncConfigConfig>("IceCrystalVeinStarReward"); |
| | | int[] _IceCrystalVeinStarBottom = ConfigParse.GetMultipleStr<int>(_IceCrystalVeinStarReward.Numerical1); |
| | | for (int i = 0; i < _IceCrystalVeinStarBottom.Length; i++)
|
| | | {
|
| | | IceCrystalVeinStarBottom.Add(_IceCrystalVeinStarBottom[i]);
|
| | | }
|
| | | int[] _IceCrystalVeinBottom = ConfigParse.GetMultipleStr<int>(_IceCrystalVeinStarReward.Numerical2); |
| | | for (int i = 0; i < _IceCrystalVeinBottom.Length; i++)
|
| | | {
|
| | | IceCrystalVeinBottom.Add(_IceCrystalVeinBottom[i]);
|
| | | } |
| | | } |
| | | |
| | |
| | | protected override void OnPreOpen() |
| | | {
|
| | | OnCreateGridLineCell(m_ScrollerController); |
| | | AddIceLodeStarAwardList(); |
| | | SetGridMiddle(); |
| | | SetGridBotton(); |
| | | } |
| | |
| | | {
|
| | |
|
| | | GameObject ObjChild = m_GridBottom.GetChild(i).gameObject;
|
| | | if (i < IceCrystalVeinBottom.Count)
|
| | | if (i < IceLodeStarAwardList.Count)
|
| | | {
|
| | | IceLodeStarAwardClass IceLode = IceLodeStarAwardList[i];
|
| | | ObjChild.SetActive(true);
|
| | | ItemCell _ItemCell = ObjChild.transform.Find("ItemCell_1").GetComponent<ItemCell>();
|
| | | Text TextStar= ObjChild.transform.Find("Text_Star").GetComponent<Text>();
|
| | | TextStar.text = "0/"+IceCrystalVeinStarBottom[i];
|
| | | ItemCellModel cellModel = new ItemCellModel(IceCrystalVeinBottom[i], true, (ulong)1);
|
| | | TextStar.text = "0/"+ IceLode.Star;
|
| | | ItemCellModel cellModel = new ItemCellModel(IceLode.ItemID, true, (ulong)1);
|
| | | _ItemCell.Init(cellModel);
|
| | | int type = i;
|
| | | _ItemCell.cellBtn.SetListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(IceCrystalVeinBottom[type], false, (ulong)1);
|
| | | ItemAttrData attrData = new ItemAttrData(IceLode.ItemID, false, (ulong)1);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | | } |
| | | private void AddIceLodeStarAwardList()
|
| | | {
|
| | | IceLodeStarAwardList.Clear();
|
| | | foreach (var key in iceCrystalVeinModel.DicIceLodeStarAward.Keys)
|
| | | {
|
| | | var Dic = iceCrystalVeinModel.DicIceLodeStarAward[key];
|
| | | int Lv = PlayerDatas.Instance.baseData.LV;
|
| | | if (Lv >= Dic.MinLv && Lv <= Dic.MaxLv)
|
| | | {
|
| | | IceLodeStarAwardList.Add(Dic);
|
| | | }
|
| | | }
|
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | m_ScreenMoveTo.gameObject.SetActive(false);
|
| | | BossNotify.OnNotifyStateEvent += OnNotifyStateEvent;
|
| | | BossShowModel.Instance.bossShowCompletedEvent += BossShowCompletedEvent;
|
| | | DemonTreasureDungeonVictoryWin.challengeNextEvent += ChallengeNextEvent;
|
| | |
|
| | | var allConfigs = Config.Instance.GetAllValues<TreasureConfig>();
|
| | | foreach (var value in allConfigs)
|
| | |
| | | {
|
| | | BossNotify.OnNotifyStateEvent -= OnNotifyStateEvent;
|
| | | BossShowModel.Instance.bossShowCompletedEvent -= BossShowCompletedEvent;
|
| | | DemonTreasureDungeonVictoryWin.challengeNextEvent -= ChallengeNextEvent;
|
| | | m_ContainerDisplay.gameObject.SetActive(true);
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void ChallengeNextEvent()
|
| | | {
|
| | | if (demonTreasureDungeon)
|
| | | {
|
| | | DisplayDemonTreasureDungeon();
|
| | | }
|
| | | }
|
| | |
|
| | | void DisplayNormalTreasureDungeon()
|
| | | {
|
| | | var config = Config.Instance.Get<TreasureConfig>(treasureId);
|
| | |
| | | demonTreasureDungeon = false;
|
| | | if (mapId == 41110)
|
| | | {
|
| | | var list = model.GetTreasureCategory(TreasureCategory.Demon);
|
| | | for (int i = 0; i < list.Count; i++)
|
| | | TreasureDungeon treasureDungeon;
|
| | | if (model.TryGetTreasureDungeon(mapId, lineId, out treasureDungeon))
|
| | | {
|
| | | TreasureDungeon treasureDungeon;
|
| | | if (model.TryGetTreasureDungeon(list[i], out treasureDungeon))
|
| | | if (treasureDungeon.currentLevel < treasureDungeon.maxLevel - 1)
|
| | | {
|
| | | var count = treasureDungeon.dungeonInfos.Count;
|
| | | if (count > 0 && treasureDungeon.dungeonInfos[0].lineId == lineId)
|
| | | {
|
| | | var maxLevel = treasureDungeon.dungeonInfos[count - 1].level;
|
| | | if (treasureDungeon.currentLevel < maxLevel - 1)
|
| | | {
|
| | | demonTreasureDungeon = true;
|
| | | break;
|
| | | }
|
| | | }
|
| | | demonTreasureDungeon = true;
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | | using TableConfig;
|
| | | using LitJson;
|
| | | using System.Text.RegularExpressions;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | var playerLevel = PlayerDatas.Instance.baseData.LV == 0 ? PlayerDatas.Instance.loginInfo.LV : PlayerDatas.Instance.baseData.LV;
|
| | | var mapResConfig = Config.Instance.Get<MapResourcesConfig>(targetMapResId);
|
| | | if (mapResConfig != null && mapResConfig.LoadingBG.Length > 0)
|
| | | if (mapResConfig != null)
|
| | | {
|
| | | var randomIndex = UnityEngine.Random.Range(0, mapResConfig.LoadingBG.Length > 1 ? mapResConfig.LoadingBG.Length + 1 : 1);
|
| | | if (randomIndex == mapResConfig.LoadingBG.Length)
|
| | | var loadingBackGroudConfig = Config.Instance.Get<LoadingBackGroundConfig>(mapResConfig.DataID);
|
| | | if (loadingBackGroudConfig != null && loadingBackGroudConfig.icons.Length > 0)
|
| | | {
|
| | | m_BackGround.SetSprite(GeneralDefine.LoadLV);
|
| | | m_ContainerFunctions.gameObject.SetActive(true);
|
| | | var functions = GetShowFunctions(PlayerDatas.Instance.baseData.LV == 0 ? PlayerDatas.Instance.loginInfo.LV : PlayerDatas.Instance.baseData.LV);
|
| | | for (int i = 0; i < m_FunctionShows.Length; i++)
|
| | | var icons = new List<string>();
|
| | | var json = JsonMapper.ToObject(loadingBackGroudConfig.levelLimit);
|
| | |
|
| | | for (var i = 0; i < loadingBackGroudConfig.icons.Length; i++)
|
| | | {
|
| | | var show = m_FunctionShows[i];
|
| | | show.Display(functions[i]);
|
| | | var icon = loadingBackGroudConfig.icons[i];
|
| | | if (json.Keys.Contains(icon))
|
| | | {
|
| | | var min = 0;
|
| | | var max = int.MaxValue;
|
| | | var levelLimit = json[icon].ToString();
|
| | | var levelsMatch = Regex.Matches(levelLimit, "\\d+");
|
| | | if (levelsMatch.Count > 0)
|
| | | {
|
| | | min = int.Parse(levelsMatch[0].Value);
|
| | | }
|
| | |
|
| | | if (levelsMatch.Count > 1)
|
| | | {
|
| | | max = int.Parse(levelsMatch[1].Value);
|
| | | }
|
| | |
|
| | | if (playerLevel > min && playerLevel < max)
|
| | | {
|
| | | icons.Add(icon);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | icons.Add(icon);
|
| | | }
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | m_BackGround.SetSprite(mapResConfig.LoadingBG[randomIndex]);
|
| | | m_ContainerFunctions.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | |
|
| | | if (mapResConfig != null && !string.IsNullOrEmpty(mapResConfig.LoadName))
|
| | | {
|
| | | m_ContainerMapName.gameObject.SetActive(true);
|
| | | m_MapName.SetSprite(mapResConfig.LoadName);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_ContainerMapName.gameObject.SetActive(false);
|
| | | }
|
| | | var randomIndex = UnityEngine.Random.Range(0, loadingBackGroudConfig.icons.Length > 1 ? icons.Count + 1 : 1);
|
| | | if (randomIndex == icons.Count)
|
| | | {
|
| | | m_BackGround.SetSprite(GeneralDefine.LoadLV);
|
| | | m_ContainerFunctions.gameObject.SetActive(true);
|
| | | var functions = GetShowFunctions(playerLevel);
|
| | | for (int i = 0; i < m_FunctionShows.Length; i++)
|
| | | {
|
| | | var show = m_FunctionShows[i];
|
| | | show.Display(functions[i]);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | m_BackGround.SetSprite(icons[randomIndex]);
|
| | | m_ContainerFunctions.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | if (mapResConfig != null && !string.IsNullOrEmpty(mapResConfig.LoadDescription))
|
| | | {
|
| | | m_ContainerMapDescription.gameObject.SetActive(true);
|
| | | m_MapDescription.SetSprite(mapResConfig.LoadDescription);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_ContainerMapDescription.gameObject.SetActive(false);
|
| | | if (loadingBackGroudConfig != null && !string.IsNullOrEmpty(loadingBackGroudConfig.name))
|
| | | {
|
| | | m_ContainerMapName.gameObject.SetActive(true);
|
| | | m_MapName.SetSprite(loadingBackGroudConfig.name);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_ContainerMapName.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | if (loadingBackGroudConfig != null && !string.IsNullOrEmpty(loadingBackGroudConfig.description))
|
| | | {
|
| | | m_ContainerMapDescription.gameObject.SetActive(true);
|
| | | m_MapDescription.SetSprite(loadingBackGroudConfig.description);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_ContainerMapDescription.gameObject.SetActive(false);
|
| | | }
|
| | | |
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | if (Application.platform == RuntimePlatform.IPhonePlayer)
|
| | | {
|
| | |
| | | RegisterModel<ChatBubbleModel>();
|
| | | RegisterModel<AccumulateRechargeModel>();
|
| | | RegisterModel<FBHelpPointExchageModel>();
|
| | | RegisterModel<IceCrystalVeinModel>();
|
| | | inited = true;
|
| | | }
|
| | |
|