少年修仙传客户端代码仓库
client_linchunjie
2018-11-24 3b4d4789cdfc0f18330f027b55ecabab9c732d85
4736  【1.3】神兵系统界面逻辑修改(添加技能特效)
2个文件已修改
31 ■■■■■ 已修改文件
System/Role/GodWeaponSkillBehaviour.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Role/MagicianModel.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Role/GodWeaponSkillBehaviour.cs
@@ -13,8 +13,11 @@
        [SerializeField] Transform m_ContainerLock;
        [SerializeField] Text m_SkillCondition;
        [SerializeField] Button m_Func;
        [SerializeField] UIEffect m_Effect;
        GodWeaponConfig config = null;
        MagicianModel model { get { return ModelCenter.Instance.GetModel<MagicianModel>(); } }
        private void Awake()
        {
@@ -25,6 +28,7 @@
        {
            this.config = config;
            var skillConfig = Config.Instance.Get<SkillConfig>(config.SkillID);
            m_Effect.StopImediatly();
            if (config != null && skillConfig != null)
            {
                m_SkillIcon.SetSprite(skillConfig.IconName);
@@ -38,6 +42,13 @@
                {
                    m_SkillCondition.text = Language.Get("L1091", config.Lv);
                }
                var effectId = 0;
                if (model.TryGetGodWeaponSkillEffect(config.SkillID, out effectId))
                {
                    m_Effect.effect = effectId;
                    m_Effect.Play();
                }
            }
        }
System/Role/MagicianModel.cs
@@ -74,6 +74,7 @@
        Dictionary<int, AutoHammerCost> autoHammerCostDict = new Dictionary<int, AutoHammerCost>();
        Dictionary<int, List<int>> godWeaponStageDict = new Dictionary<int, List<int>>();
        Dictionary<int, int> exteriorPowerDict = new Dictionary<int, int>();
        Dictionary<int, int> godWeaponSkillEffect = new Dictionary<int, int>();
        int[] autoHammerExpArea { get; set; }
        int[] autoHammerCount { get; set; }
@@ -216,6 +217,20 @@
                var type = int.Parse(key);
                var power = int.Parse(json[key].ToString());
                exteriorPowerDict.Add(type, power);
            }
            funcConfig = Config.Instance.Get<FuncConfigConfig>("GodWeaponSkillEffect");
            if (funcConfig != null)
            {
                json = LitJson.JsonMapper.ToObject(funcConfig.Numerical1);
                foreach (var key in json.Keys)
                {
                    var skillId = int.Parse(key);
                    if (!godWeaponSkillEffect.ContainsKey(skillId))
                    {
                        godWeaponSkillEffect.Add(skillId, int.Parse(json[key].ToString()));
                    }
                }
            }
        }
@@ -550,6 +565,11 @@
            return exteriorPowerDict.TryGetValue(type, out power);
        }
        public bool TryGetGodWeaponSkillEffect(int skillId, out int effect)
        {
            return godWeaponSkillEffect.TryGetValue(skillId, out effect);
        }
    }
    public class GodWeaponInfo