少年修仙传客户端代码仓库
client_Hale
2019-04-11 9f89e3be35da42eb9ccb44e6589d62f320aa444c
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
11个文件已修改
226 ■■■■ 已修改文件
Core/GameEngine/Model/Config/CreateRoleConfig.cs 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/CreateRoleConfig.cs.meta 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Lua/Gen/CreateRoleConfigWrap.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/CreateRole/CreateRoleBehaviour.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/EquipStar/EquipStarModel.cs 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/EquipStar/EquipStarWin.cs 74 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Launch/LaunchBackGroundWin.cs 60 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Login/CreateRoleWin.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Login/SelectRoleWin.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI/HUD/PopUpNum.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Utility/EnumHelper.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/CreateRoleConfig.cs
@@ -1,6 +1,6 @@
//--------------------------------------------------------
//    [Author]:           Fish
//    [  Date ]:           Thursday, February 14, 2019
//    [  Date ]:           Thursday, April 11, 2019
//--------------------------------------------------------
using System.Collections.Generic;
@@ -17,7 +17,9 @@
    public readonly string selectIcon;
    public readonly string unselectIcon;
    public readonly int skillid;
    public readonly string desc;
    public readonly string description;
    public readonly string jobName;
    public readonly string jobSign;
    public CreateRoleConfig()
    {
@@ -37,7 +39,11 @@
            int.TryParse(tables[3],out skillid); 
            desc = tables[4];
            description = tables[4];
            jobName = tables[5];
            jobSign = tables[6];
        }
        catch (Exception ex)
        {
Core/GameEngine/Model/Config/CreateRoleConfig.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: 0a16c879bf3b127479edd80ebc3b6b35
timeCreated: 1550121231
timeCreated: 1554980817
licenseType: Pro
MonoImporter:
  serializedVersion: 2
Lua/Gen/CreateRoleConfigWrap.cs
@@ -336,14 +336,6 @@
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_desc(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                CreateRoleConfig gen_to_be_invoked = (CreateRoleConfig)translator.FastGetCSObj(L, 1);
                LuaAPI.lua_pushstring(L, gen_to_be_invoked.desc);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 1;
        }
        
System/CreateRole/CreateRoleBehaviour.cs
@@ -6,6 +6,7 @@
public class CreateRoleBehaviour : MonoBehaviour
{
    [SerializeField] int m_Job;
    [SerializeField] float m_Scale = 1;
    [SerializeField] EnterPictureType m_EnterPictureType;
    [SerializeField] ShowAnimation m_EnterShowAnimation;
@@ -31,7 +32,7 @@
           if (ok)
           {
               var model = @object as GameObject;
               model.transform.SetParentEx(m_Platform.transform, Vector3.zero, Quaternion.identity, Vector3.one);
               model.transform.SetParentEx(m_Platform.transform, Vector3.zero, Quaternion.identity, Vector3.one * m_Scale);
               m_Shadow.Cast(model.transform);
               model.SetActive(true);
@@ -80,7 +81,7 @@
            if (ok)
            {
                var model = @object as GameObject;
                model.transform.SetParentEx(m_Platform.transform, Vector3.zero, Quaternion.identity, Vector3.one);
                model.transform.SetParentEx(m_Platform.transform, Vector3.zero, Quaternion.identity, Vector3.one * m_Scale);
                switch (m_EnterPictureType)
                {
System/EquipStar/EquipStarModel.cs
@@ -22,6 +22,8 @@
            {5,new LogicString () },
        };
        public readonly LogicList<Star> stars = new LogicList<Star>();
        public readonly LogicInt specialMaterial = new LogicInt();
        public readonly LogicInt starResultEffect = new LogicInt();
@@ -52,6 +54,7 @@
        public void UpdateStarLevels(HA3B1_tagMCEquipPartStarInfo info)
        {
            var selectedEquipOldStar = GetEquipStarLevel(new Int2(selectedLevel.value, selectedPlace.value));
            for (var i = 0; i < info.InfoList.Length; i++)
            {
                var equipPosition = EquipSet.ServerPlaceToClientPlace(info.InfoList[i].EquipPackIndex);
@@ -62,8 +65,12 @@
                }
            }
            equipStarLevel.value = GetEquipStarLevel(new Int2(selectedLevel.value, selectedPlace.value));
            var starLevel = GetEquipStarLevel(new Int2(selectedLevel.value, selectedPlace.value));
            equipStarLevel.value = starLevel;
            selectedPlace.dirty = true;
            var maxStarLevel = GetMaxStarLevel(selectedLevel.value);
            UpdateSelelctedEquipStars(selectedEquipOldStar, starLevel, maxStarLevel);
            foreach (var candidate in candidatePlaces.Values)
            {
@@ -174,6 +181,8 @@
            {
                item.value = string.Empty;
            }
            stars.Clear();
        }
        public void SelectLevel(int level)
@@ -212,9 +221,12 @@
                candidate.selected.value = candidate.equipPosition == equipPosition;
            }
            equipStarLevel.value = GetEquipStarLevel(equipPosition);
            equipMaxStarLevel.value = GetMaxStarLevel(equipPosition.x);
            var starLevel = GetEquipStarLevel(equipPosition);
            var maxStarLevel = GetMaxStarLevel(equipPosition.x);
            equipStarLevel.value = starLevel;
            equipMaxStarLevel.value = maxStarLevel;
            UpdateSelelctedEquipStars(starLevel, starLevel, maxStarLevel);
            AutoAddMaterials(equipPosition);
            CalculateStarUpgradeProbability(equipPosition);
        }
@@ -558,6 +570,19 @@
            return materials.ContainsKey(index) ? materials[index] : null;
        }
        private void UpdateSelelctedEquipStars(int oldStarLevel, int newStarLevel, int maxStarLevel)
        {
            stars.Clear();
            for (var i = 1; i <= maxStarLevel; i++)
            {
                stars.Add(new Star()
                {
                    actived = i <= newStarLevel,
                    newGet = i <= newStarLevel && i > oldStarLevel,
                });
            }
        }
        private void ParseConfig()
        {
            var configs = EquipStarConfig.GetValues();
@@ -570,6 +595,11 @@
            }
        }
        public struct Star
        {
            public bool actived;
            public bool newGet;
        }
    }
}
System/EquipStar/EquipStarWin.cs
@@ -15,7 +15,7 @@
    public class EquipStarWin : Window
    {
        [SerializeField] RectTransform m_LevelContainer;
        [SerializeField] ImageCouple[] m_Stars;
        [SerializeField] Star[] m_Stars;
        [SerializeField] ItemCell m_TargetEquip;
        [SerializeField] Text m_EquipStar;
        [SerializeField] Materials m_Materials;
@@ -56,7 +56,6 @@
            }
            DisplayBaseInfo();
            DisplayDynamicInfo(true);
        }
        protected override void OnAfterOpen()
@@ -71,6 +70,12 @@
        protected override void OnAfterClose()
        {
            model.ResetOperateParams();
        }
        protected override void OnActived()
        {
            base.OnActived();
            DisplayDynamicInfo(true);
        }
        protected override void LateUpdate()
@@ -143,9 +148,13 @@
                var equipPosition = new Int2(model.selectedLevel.value, model.selectedPlace.value);
                var starLevel = model.equipStarLevel.Fetch();
                var maxStar = model.equipMaxStarLevel.Fetch();
                DisplayStars(equipPosition, starLevel, maxStar);
                DisplayPropertyPreview(equipPosition, starLevel, EquipStarModel.GetMaxStarLevel(equipPosition.x));
                DisplayStarUpgradeButton(equipPosition, starLevel);
            }
            if (force || model.stars.dirty)
            {
                DisplayStars(model.stars.Fetch());
            }
            if (force || model.starUpgradeProbability.dirty)
@@ -167,29 +176,10 @@
            }
        }
        private void DisplayStars(Int2 equipPosition, int currentStar, int maxStar)
        private void DisplayStars(List<EquipStarModel.Star> stars)
        {
            if (equipPosition.y == 0)
            {
                foreach (var behaviour in m_Stars)
                {
                    behaviour.Hide();
                }
            }
            else
            {
                for (var i = 0; i < m_Stars.Length; i++)
                {
                    if (i < maxStar)
                    {
                        m_Stars[i].Display(i < currentStar);
                    }
                    else
                    {
                        m_Stars[i].Hide();
                    }
                }
            }
            StopCoroutine("Co_DisplayStars");
            StartCoroutine("Co_DisplayStars", stars);
        }
        private void DisplayMaterialSlots(Int2 equipPosition, int currentStarLevel)
@@ -427,6 +417,32 @@
            m_EffectFailed.Play();
        }
        IEnumerator Co_DisplayStars(List<EquipStarModel.Star> stars)
        {
            var hasNewStar = stars.FindIndex(x => { return x.newGet; }) != -1;
            if (hasNewStar)
            {
                yield return WaitingForSecondConst.WaitMS2000;
            }
            for (var i = 0; i < m_Stars.Length; i++)
            {
                if (i < stars.Count)
                {
                    var star = stars[i];
                    m_Stars[i].Display(star.actived);
                    if (star.newGet)
                    {
                        m_Stars[i].PlayEffect();
                    }
                }
                else
                {
                    m_Stars[i].Hide();
                }
            }
        }
        private void ViewEquipTip()
        {
            var level = model.selectedLevel.value;
@@ -440,11 +456,12 @@
        }
        [System.Serializable]
        public class ImageCouple
        public class Star
        {
            public RectTransform container;
            public Image imageBase;
            public Image imageStar;
            public UIEffect newStarEffect;
            public void Display(bool active)
            {
@@ -456,6 +473,11 @@
            {
                container.gameObject.SetActive(false);
            }
            public void PlayEffect()
            {
                newStarEffect.Play();
            }
        }
        [System.Serializable]
System/Launch/LaunchBackGroundWin.cs
@@ -17,16 +17,11 @@
    {
        [SerializeField] RectTransform m_StaticBackGround;
        [SerializeField] Image m_BackGroundImage;
        [SerializeField] RectTransform m_DynamicBackGround;
        [SerializeField] SkeletonGraphic m_SkeletonGraphic;
        [SerializeField] UIAlphaTween m_AlphaTween;
        GameObject loginEffect;
        bool useStaticBackGround = false;
        #region Built-in
        protected override void BindController()
        {
            loginEffect = this.transform.Find("Pivot/Effect_DengLu").gameObject;
        }
        protected override void AddListeners()
@@ -36,41 +31,18 @@
        protected override void OnPreOpen()
        {
            var sprite = BuiltInLoader.LoadSprite("LoginBackGround");
            useStaticBackGround = sprite != null;
            if (useStaticBackGround)
            {
                m_BackGroundImage.overrideSprite = sprite;
                m_StaticBackGround.gameObject.SetActive(true);
                m_DynamicBackGround.gameObject.SetActive(false);
            }
            else
            {
                m_StaticBackGround.gameObject.SetActive(false);
                m_DynamicBackGround.gameObject.SetActive(true);
            }
            if (loginEffect != null)
            {
                loginEffect.gameObject.SetActive(false);
            }
            m_BackGroundImage.overrideSprite = sprite;
            m_StaticBackGround.gameObject.SetActive(true);
            this.transform.SetAsFirstSibling();
        }
        protected override void OnAfterOpen()
        {
            StageLoad.Instance.onStageLoadFinish += ShowLoginEffect;
            if (StageLoad.Instance.currentStage is LoginStage)
            {
                ShowLoginEffect();
            }
        }
        protected override void OnPreClose()
        {
            StageLoad.Instance.onStageLoadFinish -= ShowLoginEffect;
            Resources.UnloadAsset(m_SkeletonGraphic.material);
        }
        protected override void OnAfterClose()
@@ -80,33 +52,15 @@
        protected override void OnActived()
        {
            base.OnActived();
            if (!useStaticBackGround)
            {
                if (m_SkeletonGraphic != null)
                {
                    m_SkeletonGraphic.AnimationState.SetEmptyAnimations(0);
                }
            }
        }
        #endregion
        void ShowLoginEffect()
        private void Start()
        {
            if (!useStaticBackGround)
            {
                if (loginEffect != null)
                {
                    loginEffect.gameObject.SetActive(true);
                }
                if (m_SkeletonGraphic != null)
                {
                    m_SkeletonGraphic.AnimationState.SetAnimation(0, "animation2", true);
                }
            }
            m_AlphaTween.Play();
        }
        #endregion
    }
}
System/Login/CreateRoleWin.cs
@@ -21,11 +21,13 @@
        [SerializeField] Button m_Back;
        [SerializeField] InputField m_NameInput;
        [SerializeField] Image m_Description;
        [SerializeField] Image m_JobName;
        [SerializeField] Image m_JobSign;
        [SerializeField] PositionTween m_LeftPostionTween;
        [SerializeField] PositionTween m_RightPositionTween;
        [SerializeField] UIAlphaTween m_AlphaTween;
        LoginModel model { get { return ModelCenter.Instance.GetModel<LoginModel>(); } }
@@ -81,7 +83,6 @@
            base.OnActived();
            m_LeftPostionTween.Play();
            m_RightPositionTween.Play();
            m_AlphaTween.Play();
            ChangeUserName(CreateRoleManager.Instance.selectedJob.value, true);
            DisplayDynamicInfo(true);
@@ -105,7 +106,9 @@
                m_JobSelect2.SetSelected(job == 2);
                var config = CreateRoleConfig.Get(job);
                m_Description.SetSprite(config.desc);
                m_Description.SetSprite(config.description);
                m_JobName.SetSprite(config.jobName);
                m_JobSign.SetSprite(config.jobSign);
            }
        }
@@ -232,8 +235,9 @@
            public void SetSelected(bool selected)
            {
                var config = CreateRoleConfig.Get(job);
                backGround.SetSprite(selected ? config.selectIcon : config.unselectIcon);
                icon.SetSprite(selected ? "CreateRole_Job1_Select" : "CreateRole_Job1_UnSelect");
                backGround.SetSprite(selected ? "CreateRole_ChoosenBottom_a" : "CreateRole_UnChoosenBottom_a");
                icon.SetSprite(selected ? config.selectIcon : config.unselectIcon);
                icon.SetNativeSize();
            }
        }
System/Login/SelectRoleWin.cs
@@ -18,8 +18,11 @@
        [SerializeField] Text m_PlayerLevel;
        [SerializeField] Button m_Begin;
        [SerializeField] Image m_Description;
        [SerializeField] Button m_Back;
        [SerializeField] Image m_Description;
        [SerializeField] Image m_JobName;
        [SerializeField] Image m_JobSign;
        SelectRoleProcessor m_SelectRoleProcessor;
        SelectRoleProcessor selectRoleProcessor {
@@ -103,7 +106,9 @@
            m_PlayerName.text = PlayerDatas.Instance.loginInfo.PlayerName.ToString();//玩家昵称
            m_PlayerLevel.text = Language.Get("Z1024", PlayerDatas.Instance.loginInfo.LV);//玩家等级
            var config = CreateRoleConfig.Get(PlayerDatas.Instance.loginInfo.Job);
            m_Description.SetSprite(config.desc);
            m_Description.SetSprite(config.description);
            m_JobName.SetSprite(config.jobName);
            m_JobSign.SetSprite(config.jobSign);
            selectRoleProcessor.Show(PlayerDatas.Instance.loginInfo.Job);
        }
UI/HUD/PopUpNum.cs
@@ -331,6 +331,10 @@
            PetZhuXian = 38,                        //宠物诛仙                      
            EnemyZhuXian = 39,                   //敌人诛仙
            PlayerDeadlyHit = 43,                    //玩家致死一击
            PetDeadlyHit = 44,                        //宠物致死一击
            EnemyDeadlyHit = 45,                   //敌人致死一击
            BuffAddDefense = 101,//+防御buff
            BuffAddAttack = 102,//+攻击buff
            BuffAddAttackSpeed = 103,//+攻速buff
Utility/EnumHelper.cs
@@ -1162,6 +1162,8 @@
    ZhuXianAtk,
    /** 终极斩杀 */
    FinalKill,
    /*致命一击*/
    DeadlyHit
}
public enum DungeonTargetType