少年修仙传客户端代码仓库
client_Wu Xijin
2019-03-14 007541eae116f6b73f992c1a4df7ecbe77178099
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
7个文件已修改
4个文件已添加
234 ■■■■■ 已修改文件
Core/GameEngine/Model/Config/RealmConfig.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/RealmConfig.cs.meta 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmBriefBehaviour.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmEquipPreviewWin.cs 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmEquipPreviewWin.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmHeartMagicBehaviour.cs 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmLevelUpBehaviour.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmModel.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmRestraintWin.cs 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmRestraintWin.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmWin.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/RealmConfig.cs
@@ -25,6 +25,7 @@
    public readonly int Quality;
    public readonly int FightPower;
    public readonly string equipNameIcon;
    public readonly string equips;
    public readonly int effectId;
    public readonly int requireIconEffect;
@@ -72,9 +73,11 @@
            equipNameIcon = tables[11];
            int.TryParse(tables[12],out effectId);
            equips = tables[12];
            int.TryParse(tables[13],out requireIconEffect);
            int.TryParse(tables[13],out effectId);
            int.TryParse(tables[14],out requireIconEffect);
        }
        catch (Exception ex)
        {
Core/GameEngine/Model/Config/RealmConfig.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: d49ca04ff4a91bc4fb645c417f9ef0b3
timeCreated: 1552531605
timeCreated: 1552548022
licenseType: Pro
MonoImporter:
  serializedVersion: 2
System/Realm/RealmBriefBehaviour.cs
@@ -99,7 +99,8 @@
        private void OnEquipPreview()
        {
            RealmEquipPreviewWin.selectRealmLevel = realmLevel;
            WindowCenter.Instance.Open<RealmEquipPreviewWin>();
        }
    }
}
System/Realm/RealmEquipPreviewWin.cs
New file
@@ -0,0 +1,78 @@
//--------------------------------------------------------
//    [Author]:           第二世界
//    [  Date ]:           Thursday, March 14, 2019
//--------------------------------------------------------
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
namespace Snxxz.UI
{
    public class RealmEquipPreviewWin : Window
    {
        [SerializeField] RawImage m_RawPlayer;
        [SerializeField] Image m_EquipName;
        [SerializeField] Button m_Close;
        public static int selectRealmLevel = 0;
        RealmModel model { get { return ModelCenter.Instance.GetModel<RealmModel>(); } }
        #region Built-in
        protected override void BindController()
        {
        }
        protected override void AddListeners()
        {
            m_Close.AddListener(CloseClick);
        }
        protected override void OnPreOpen()
        {
            Display();
        }
        protected override void OnAfterOpen()
        {
        }
        protected override void OnPreClose()
        {
            UI3DModelExhibition.Instance.StopShow();
        }
        protected override void OnAfterClose()
        {
        }
        #endregion
        void Display()
        {
            var config = RealmConfig.Get(selectRealmLevel);
            m_EquipName.SetSprite(config.equipNameIcon);
            var job = PlayerDatas.Instance.baseData.Job;
            int[] equips = null;
            model.TryGetRealmPreviewEquips(selectRealmLevel, job, out equips);
            UI3DModelExhibition.Instance.ShowPlayer(m_RawPlayer, new UI3DPlayerExhibitionData()
            {
                job = job,
                clothesId = equips != null && equips.Length > 0 ? equips[0] : 0,
                weaponId = equips != null && equips.Length > 1 ? equips[1] : 0,
                secondaryId = equips != null && equips.Length > 2 ? equips[2] : 0,
                suitLevel = 1,
            });
        }
    }
}
System/Realm/RealmEquipPreviewWin.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: a9d590a96045b4d468ca4e5a772cb9d0
timeCreated: 1552546225
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/Realm/RealmHeartMagicBehaviour.cs
@@ -12,6 +12,7 @@
        [SerializeField] Text m_FightPower;
        [SerializeField] RawImage m_RawBoss;
        [SerializeField] Button m_Goto;
        [SerializeField] UIEffect m_OpenEffect;
        const string State_EnterHash = "Show";
        const string State_IdleHash = "Idle";
@@ -30,7 +31,11 @@
            this.realmLevel = realmLevel;
            DisplayBase();
            DisplayBoss();
            m_RawBoss.gameObject.SetActive(false);
            m_OpenEffect.Play();
            StartCoroutine(Co_DisplayBoss());
        }
        void DisplayBase()
@@ -41,6 +46,14 @@
            var label = UIHelper.AppendColor(satisfy ? TextColType.LightGreen : TextColType.Red, fightPower.ToString());
            m_FightPower.text = StringUtility.Contact(UIHelper.AppendColor(TextColType.LightGreen,
                Language.Get("RolePromoteBetterFight")), label, "/", config.FightPower);
            var npcConfig = NPCConfig.Get(config.BossID);
            m_BossName.text = npcConfig.charName;
        }
        IEnumerator Co_DisplayBoss()
        {
            yield return WaitingForSecondConst.WaitMS1800;
            DisplayBoss();
        }
        void DisplayBoss()
@@ -55,7 +68,6 @@
            });
            var npcConfig = NPCConfig.Get(config.BossID);
            m_BossName.text = npcConfig.charName;
            var npcModel = UI3DModelExhibition.Instance.NpcModelPet;
            if (npcModel != null)
@@ -73,6 +85,7 @@
        public void Dispose()
        {
            UI3DModelExhibition.Instance.StopShow();
            StopAllCoroutines();
        }
        private void GotoBoss()
System/Realm/RealmLevelUpBehaviour.cs
@@ -13,6 +13,7 @@
        [SerializeField] RealmUpCondition m_BossCondition;
        [SerializeField] Transform m_ContainerCost;
        [SerializeField] ItemBehaviour m_Item;
        [SerializeField] Text m_RequireRealmLevel;
        [SerializeField] Button m_LevelUp;
        int realmLevel = 0;
@@ -33,11 +34,17 @@
            m_ContainerCondition.gameObject.SetActive(isNext);
            m_ContainerCost.gameObject.SetActive(isNext);
            m_LevelUp.gameObject.SetActive(isNext);
            m_RequireRealmLevel.gameObject.SetActive(!isNext);
            if (isNext)
            {
                DisplayCondition();
                DisplayCost();
            }
            else
            {
                var config = RealmConfig.Get(realmLevel - 1);
                m_RequireRealmLevel.text = Language.Get("RealmLevelUpRequire", config.Img);
            }
        }
@@ -135,7 +142,8 @@
        public void DisplayBoss(int realmLevel)
        {
            var config = RealmConfig.Get(realmLevel);
            m_Condition.text = Language.Get("RealmConditionBoss", config.Name);
            var label = UIHelper.GetRealmColorByLv(realmLevel, StringUtility.Contact("[", config.Name, "]"));
            m_Condition.text = Language.Get("RealmConditionBoss", label);
            var progress = model.isBossPass ? 1 : 0;
            m_Progress.text = StringUtility.Contact(progress, "/", 1);
            m_Progress.color = model.isBossPass ? UIHelper.s_LightGreen : UIHelper.s_DarkRedColor;
System/Realm/RealmModel.cs
@@ -11,6 +11,7 @@
    public class RealmModel : Model, IPlayerLoginOk, IBeforePlayerDataInitialize
    {
        Dictionary<int, Dictionary<int, int>> m_RealmProperties = new Dictionary<int, Dictionary<int, int>>();
        Dictionary<int, Dictionary<int, int[]>> m_RealmPreviewEquips = new Dictionary<int, Dictionary<int, int[]>>();
        List<List<int>> m_RealmStages = new List<List<int>>();
        public int realmMaxLevel { get; private set; }
        public bool isBossPass { get; private set; }
@@ -98,6 +99,19 @@
                        stages.Add(config.Lv + 1);
                    }
                }
                if (!string.IsNullOrEmpty(config.equips))
                {
                    var json = LitJson.JsonMapper.ToObject(config.equips);
                    Dictionary<int, int[]> dict = new Dictionary<int, int[]>();
                    foreach (var jobKey in json.Keys)
                    {
                        var job = int.Parse(jobKey);
                        var equipArray = LitJson.JsonMapper.ToObject<int[]>(json[jobKey].ToJson());
                        dict.Add(job, equipArray);
                    }
                    m_RealmPreviewEquips.Add(config.Lv, dict);
                }
            }
        }
@@ -117,6 +131,16 @@
            return false;
        }
        public bool TryGetRealmPreviewEquips(int level, int job, out int[] equips)
        {
            equips = null;
            if (m_RealmPreviewEquips.ContainsKey(level))
            {
                return m_RealmPreviewEquips[level].TryGetValue(job, out equips);
            }
            return false;
        }
        public bool IsUnlockEquipRealm(int realmLevel, out int level)
        {
            level = 0;
System/Realm/RealmRestraintWin.cs
New file
@@ -0,0 +1,51 @@
//--------------------------------------------------------
//    [Author]:           第二世界
//    [  Date ]:           Thursday, March 14, 2019
//--------------------------------------------------------
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
namespace Snxxz.UI
{
    public class RealmRestraintWin : Window
    {
        [SerializeField] Button m_Confirm;
        #region Built-in
        protected override void BindController()
        {
        }
        protected override void AddListeners()
        {
            m_Confirm.AddListener(CloseClick);
        }
        protected override void OnPreOpen()
        {
        }
        protected override void OnAfterOpen()
        {
        }
        protected override void OnPreClose()
        {
        }
        protected override void OnAfterClose()
        {
        }
        #endregion
    }
}
System/Realm/RealmRestraintWin.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 437cef43d1a9a6647ad35dc25ee0c6c6
timeCreated: 1552549504
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/Realm/RealmWin.cs
@@ -25,6 +25,9 @@
        [SerializeField] Button m_GotoBoss;
        [SerializeField] Button m_Close;
        [SerializeField] PositionTween m_RealmBriefTween;
        [SerializeField] PositionTween m_RealmLevelUpTween;
        RealmState m_RealmState = RealmState.LevelUp;
        RealmState realmState
        {
@@ -75,6 +78,7 @@
        {
            m_Close.onClick.AddListener(OnBack);
            m_GotoBoss.AddListener(GotoBoss);
            m_RealmRestraint.AddListener(RealmRestraint);
        }
        protected override void OnPreOpen()
@@ -91,6 +95,9 @@
            m_RealmState = RealmState.LevelUp;
            HideRealmBoss();
            DisplayRealmUp();
            m_RealmBriefTween.Play();
            m_RealmLevelUpTween.Play();
        }
        protected override void OnAfterOpen()
@@ -136,6 +143,10 @@
        {
            m_ContainerRealmUp.gameObject.SetActive(false);
            m_RealmAnimation.StopRotate();
            m_RealmBriefTween.Stop();
            m_RealmBriefTween.SetEndState();
            m_RealmLevelUpTween.Stop();
            m_RealmLevelUpTween.SetEndState();
            foreach (var item in m_RealmStages)
            {
                item.Dispose();
@@ -192,7 +203,7 @@
            }
            var config = RealmConfig.Get(model.selectRealm - 1);
            m_GotoBoss.gameObject.SetActive(requireLevelUp && config != null && config.BossID != 0);
            m_GotoBoss.gameObject.SetActive(model.selectRealm == realmLevel + 1 && config != null && config.BossID != 0);
        }
        void DisplayRealmBrief()
@@ -264,6 +275,11 @@
            }
        }
        private void RealmRestraint()
        {
            WindowCenter.Instance.Open<RealmRestraintWin>();
        }
        public enum RealmState
        {
            LevelUp,