Пример #1
0
        //-------------------------------------------------------------------------
        public FishParticleMgr(CRenderScene render_scene, CRenderFish fish, int fish_vib_id, ISpriteFish sprite_fish)
        {
            mScene           = render_scene;
            mCRenderFish     = fish;
            mParticlemanager = mScene.getParticlemanager();
            mISpriteFish     = sprite_fish;

            mFishData = EbDataMgr.Instance.getData <TbDataFish>(fish_vib_id);

            //解析鱼带的特效数据并保存下来,等待鱼指定播放特效
            foreach (var it in mFishData.ParticleArray)
            {
                if (null == it.TbDataParticle || it.TbDataParticle.Id <= 0)
                {
                    continue;
                }

                TbDataFish.ParticleProduceTimeEnum time_enum = (TbDataFish.ParticleProduceTimeEnum)it.ParticleProduceTime;
                if (!mDicParticleData.ContainsKey(time_enum))
                {
                    mDicParticleData[time_enum] = new List <TbDataFish.ParticleDataStruct>();
                }
                mDicParticleData[time_enum].Add(it);
            }
        }
Пример #2
0
        //-------------------------------------------------------------------------
        List <StillParticle> _loopBuildParticle(TbDataFish.ParticleProduceTimeEnum time_enum, uint et_player_rpcid = 0)
        {
            if (!mDicParticleData.ContainsKey(time_enum))
            {
                return(new List <StillParticle>());
            }

            List <StillParticle> particle_list = new List <StillParticle>();

            foreach (var it in mDicParticleData[time_enum])
            {
                particle_list.Add(_buildParticle(it, et_player_rpcid));
            }

            return(particle_list);
        }