少年修仙传客户端代码仓库
client_Hale
2018-11-13 f78a369fcfd2cb171181c12f880c7c45dd804c76
4129 技能相关特效预加载及异步加载逻辑 报错修复
1个文件已修改
49 ■■■■ 已修改文件
Core/ResModule/InstanceResourcesLoader.cs 49 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/ResModule/InstanceResourcesLoader.cs
@@ -498,39 +498,42 @@
        }
        var _soSkill = _skillInfo.soFile;
        for (int i = 0; i < _soSkill.animationEventList.Count; ++i)
        if (_soSkill != null)
        {
            if (_soSkill.animationEventList[i].frameEventType == E_FrameEventType.OnPlayEffect)
            for (int i = 0; i < _soSkill.animationEventList.Count; ++i)
            {
                if (_soSkill.animationEventList[i].intParam > 0)
                if (_soSkill.animationEventList[i].frameEventType == E_FrameEventType.OnPlayEffect)
                {
                    InstanceResourcesLoader.LoadEffectAsync(_soSkill.animationEventList[i].intParam);
                }
            }
            else if (_soSkill.animationEventList[i].frameEventType == E_FrameEventType.OnSkillEvent)
            {
                var _param = _soSkill.animationEventList[i].intParam;
                var _type = SoSkill.GetAttactType(_param);
                var _id = SoSkill.GetFrameEventId(_param);
                if (_type == SoSkill.E_AttackType.Sweep)
                {
                    var _config = ScriptableObjectLoader.LoadSoSweepHit(_id);
                    if (_config.hitEffectId > 0)
                    if (_soSkill.animationEventList[i].intParam > 0)
                    {
                        InstanceResourcesLoader.LoadEffectAsync(_config.hitEffectId);
                        InstanceResourcesLoader.LoadEffectAsync(_soSkill.animationEventList[i].intParam);
                    }
                }
                else if (_type == SoSkill.E_AttackType.FlyObject)
                else if (_soSkill.animationEventList[i].frameEventType == E_FrameEventType.OnSkillEvent)
                {
                    var _config = ScriptableObjectLoader.LoadSoFlyObject(_id);
                    if (_config.hitEffectId > 0)
                    var _param = _soSkill.animationEventList[i].intParam;
                    var _type = SoSkill.GetAttactType(_param);
                    var _id = SoSkill.GetFrameEventId(_param);
                    if (_type == SoSkill.E_AttackType.Sweep)
                    {
                        InstanceResourcesLoader.LoadEffectAsync(_config.hitEffectId);
                        var _config = ScriptableObjectLoader.LoadSoSweepHit(_id);
                        if (_config.hitEffectId > 0)
                        {
                            InstanceResourcesLoader.LoadEffectAsync(_config.hitEffectId);
                        }
                    }
                    else if (_type == SoSkill.E_AttackType.FlyObject)
                    {
                        var _config = ScriptableObjectLoader.LoadSoFlyObject(_id);
                        if (_config.hitEffectId > 0)
                        {
                            InstanceResourcesLoader.LoadEffectAsync(_config.hitEffectId);
                        }
                    if (_config.ammoEffectId > 0)
                    {
                        InstanceResourcesLoader.LoadEffectAsync(_config.hitEffectId);
                        if (_config.ammoEffectId > 0)
                        {
                            InstanceResourcesLoader.LoadEffectAsync(_config.hitEffectId);
                        }
                    }
                }
            }