Ejemplo n.º 1
0
    public void LoadSkillEffect(int _effectId, bool _isPlay, Transform _pos)
    {
        //读取配置表 加载特效名
        CSVFile _config = CVS.Instance.getFile("Effect");

        if (_config == null)
        {
            return;
        }
        string path_str = _config.GetDataByIdAndName(_effectId, "ActionSpecialEffects");

        if (path_str.Length <= 0)
        {
            return;
        }

        string[] pathArr = path_str.Split('|');

        if (pathArr.Length > 0)
        {
            ResData _res = new ResData();
            _res.effectId    = _effectId;
            _res.bundleName  = pathArr[0] + ".effect";
            _res.resName     = pathArr[1];
            _res.playPos     = _pos;
            _res.loadAndPlay = _isPlay;
            _res.endTime     = _config.GetDataByIdAndNameToFloat(_effectId, "StopTime") / 1000;
            ResLoadQue.Enqueue(_res);
        }
    }