示例#1
0
    public void RemoveFXs(int id)
    {
        if (id == 0)
        {
            return;
        }
        var fx = EffectData.GetByID(id);

        RemoveFXs(id, fx.group);
    }
示例#2
0
    /// <summary>
    /// 插入特效
    /// </summary>
    /// <param name="id">FXData id</param>
    /// <param name="action">加载对象回调</param>
    public void HandleFx(int id, Transform target = null, System.Action <GameObject, string> action = null, string bone_path = "")
    {
        EffectData fxData = EffectData.GetByID(id);

        if (fxData != null)
        {
            if (fxData.effectType == (int)EffectType.Flying)
            {
                Shoot(fxData, target);
            }
            else
            {
                PlayFX(id, fxData, action, bone_path);
            }
        }
        else
        {
            Debuger.LogWarning(string.Format("Can not find fxData {0}", id));
        }
    }