| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Saturday, August 18, 2018 |
| | | // [ Date ]: Tuesday, August 21, 2018 |
| | | //-------------------------------------------------------- |
| | | |
| | | using UnityEngine; |
| | |
| | | |
| | | public int NPCID { get ; private set ; } |
| | | public int MonsterType { get ; private set ; } |
| | | public int RefreshTimeType { get ; private set ; } |
| | | public int[] RefreshTime; |
| | | public int[] RareItemID; |
| | | public string PortraitID { get ; private set; } |
| | | |
| | |
| | | |
| | | MonsterType=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0; |
| | | |
| | | RefreshTimeType=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0; |
| | | |
| | | string[] RefreshTimeStringArray = rawContents[3].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | RefreshTime = new int[RefreshTimeStringArray.Length]; |
| | | for (int i=0;i<RefreshTimeStringArray.Length;i++) |
| | | { |
| | | int.TryParse(RefreshTimeStringArray[i],out RefreshTime[i]); |
| | | } |
| | | |
| | | string[] RareItemIDStringArray = rawContents[4].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | string[] RareItemIDStringArray = rawContents[2].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | RareItemID = new int[RareItemIDStringArray.Length]; |
| | | for (int i=0;i<RareItemIDStringArray.Length;i++) |
| | | { |
| | | int.TryParse(RareItemIDStringArray[i],out RareItemID[i]); |
| | | } |
| | | |
| | | PortraitID = rawContents[5].Trim(); |
| | | PortraitID = rawContents[3].Trim(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | fileFormatVersion: 2 |
| | | guid: e3a382a765dc3ce4db610c70a6b30d8f |
| | | timeCreated: 1534559386 |
| | | timeCreated: 1534817173 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | for (int i = 0; i < package.NPCCollCntList.Length; i++) |
| | | { |
| | | var collect = package.NPCCollCntList[i]; |
| | | if (collect.NPCID == 9999) |
| | | if (collect.NPCID == model.bigBoxNpcId) |
| | | { |
| | | model.bigBoxCollectCount = collect.CollectionCnt; |
| | | } |
| | | |
| | | if (collect.NPCID == model.smallBoxNpcId) |
| | | { |
| | | model.smallBoxCollectCount = collect.CollectionCnt; |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | public class DogzDungeonBreifInfoBehaviour : FindPreciousBossBriefInfoBehaviour |
| | | { |
| | | |
| | | [SerializeField] Text m_RefreshTimesDescription; |
| | | [SerializeField] Image m_Attention; |
| | | |
| | | protected override int selectedBossId { |
| | |
| | | } |
| | | |
| | | DogzDungeonModel model { get { return ModelCenter.Instance.GetModel<DogzDungeonModel>(); } } |
| | | |
| | | protected override void DrawBossBaseInfo(string _icon, string _name, int _level, int _realm) |
| | | { |
| | | var config = ConfigManager.Instance.GetTemplate<DogzDungeonConfig>(bossId); |
| | | m_Portrait.SetSprite(_icon); |
| | | m_Portrait.SetNativeSize(); |
| | | m_BossName.text = _name; |
| | | |
| | | m_BossLevel.text = config.MonsterType == 3 ? "(随机boss)" : Language.Get("Z1024", _level); |
| | | |
| | | if (m_Realm != null) |
| | | { |
| | | if (_realm > 0) |
| | | { |
| | | m_Realm.gameObject.SetActive(true); |
| | | var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(_realm); |
| | | if (realmConfig != null) |
| | | { |
| | | m_Realm.SetSprite(realmConfig.Img); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | m_Realm.gameObject.SetActive(false); |
| | | } |
| | | } |
| | | } |
| | | |
| | | private void DisplayRefreshTimesDescription() |
| | | { |
| | | var config = ConfigManager.Instance.GetTemplate<DogzDungeonConfig>(bossId); |
| | | |
| | | var timeStrings = new string[config.RefreshTime.Length]; |
| | | for (int i = 0; i < config.RefreshTime.Length; i++) |
| | | { |
| | | timeStrings[i] = config.RefreshTime[i].ToString(); |
| | | } |
| | | |
| | | m_RefreshTimesDescription.text = string.Join("、", timeStrings); |
| | | |
| | | } |
| | | |
| | | |
| | | public override void Display(object _data) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | int m_SmallBoxCollectCount = 0; |
| | | public int smallBoxCollectCount { |
| | | get { return m_SmallBoxCollectCount; } |
| | | set { m_SmallBoxCollectCount = value; } |
| | | } |
| | | |
| | | public event Action<int> bossSelectedEvent; |
| | | public event Action bossWearyValueChangeEvent; |
| | | public event Action bigBoxCollectCountChangeEvent; |
| | |
| | | protected override void OnActived() |
| | | { |
| | | base.OnActived(); |
| | | ShowBosses(); |
| | | model.RequestBoxSurplusInfo(); |
| | | model.RequestEliteSurplusInfo(); |
| | | } |
| | | #endregion |
| | | |
| | |
| | |
|
| | | public enum FindPreciousType
|
| | | {
|
| | | None,
|
| | | WorldBoss,
|
| | | BossHome,
|
| | | PersonalBoss,
|
| | | ElderGodArea,
|
| | | DemonJar,
|
| | | DogzDungeon,
|
| | | WorldBoss = 0,
|
| | | BossHome = 1,
|
| | | PersonalBoss = 2,
|
| | | ElderGodArea = 3,
|
| | | DemonJar = 4,
|
| | | DogzDungeon = 5,
|
| | | None = 99,
|
| | | }
|
| | |
|
| | | public enum GotServerRewardType
|