yyl
昨天 8c279427332ae2abf33df0e403736634c48258df
绑定战场点位特效支持

(cherry picked from commit e122cfdd7602ba5357349789c8a1db80ee228bba)
3个文件已修改
47 ■■■■ 已修改文件
Main/Config/Configs/EffectConfig.cs 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Battle/BattleEffectMgr.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Battle/BattleField/BattleRootNode.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/EffectConfig.cs
@@ -1,6 +1,6 @@
//--------------------------------------------------------
//    [Author]:           YYL
//    [  Date ]:           2025年9月2日
//    [  Date ]:           2026年6月4日
//--------------------------------------------------------
using System.Collections.Generic;
@@ -23,6 +23,7 @@
    public int[] animIndex;
    public int audio;
    public string nodeName;
    public int BindPos;
    public int notShow;
    public int autoDestroy;
    public float destroyDelay;
@@ -68,25 +69,27 @@
            nodeName = tables[6];
            int.TryParse(tables[7],out notShow);
            int.TryParse(tables[7],out BindPos);
            int.TryParse(tables[8],out autoDestroy);
            int.TryParse(tables[8],out notShow);
            float.TryParse(tables[9],out destroyDelay);
            int.TryParse(tables[9],out autoDestroy);
            int.TryParse(tables[10],out isLoop);
            float.TryParse(tables[10],out destroyDelay);
            int.TryParse(tables[11],out frontBack);
            int.TryParse(tables[11],out isLoop);
            float.TryParse(tables[12],out delayPlay);
            int.TryParse(tables[12],out frontBack);
            if (tables[13].Contains("["))
            float.TryParse(tables[13],out delayPlay);
            if (tables[14].Contains("["))
            {
                effectPos = JsonMapper.ToObject<int[]>(tables[13]);
                effectPos = JsonMapper.ToObject<int[]>(tables[14]);
            }
            else
            {
                string[] effectPosStringArray = tables[13].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
                string[] effectPosStringArray = tables[14].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
                effectPos = new int[effectPosStringArray.Length];
                for (int i=0;i<effectPosStringArray.Length;i++)
                {
@@ -94,7 +97,7 @@
                }
            }
            float.TryParse(tables[14],out effectScale);
            float.TryParse(tables[15],out effectScale);
        }
        catch (Exception exception)
        {
Main/System/Battle/BattleEffectMgr.cs
@@ -82,12 +82,22 @@
            return null;
        }
        bool isRedCamp = camp == BattleCamp.Red;
        if (effectCfg.BindPos > 0 && effectCfg.BindPos <=7)
        {
            var go = battleField.battleRootNode.GetRootNode(camp, effectCfg.BindPos);
            if (go != null)
            {
                parent = go.transform;
            }
        }
        if (!effectDict.ContainsKey(effectId))
        {
            effectDict[effectId] = new List<BattleEffectPlayer>();
        }
        bool isRedCamp = camp == BattleCamp.Red;
        BattleEffectPlayer effectPlayer = BattleEffectPlayer.Create(effectId, battleField, battleField.battleRootNode.transform, isRedCamp, _scaleRatio);
        // 设置特效缩放和方向
Main/System/Battle/BattleField/BattleRootNode.cs
@@ -84,4 +84,14 @@
    public GameObject skillMaskNode;
    public GameObject battleStartNode;
    public GameObject GetRootNode(BattleCamp battleCamp, int pos)
    {
        if (pos <= 0 || pos > 7)
        {
            pos = 2;
        }
        var rootNodeList = battleCamp == BattleCamp.Red ? redTeamNodeList : blueTeamNodeList;
        return rootNodeList[pos - 1];
    }
}