Exemplo n.º 1
0
        //-------------------------------------------------------------------------
        public void fishCoins(uint et_player_rpcid)
        {
            if (null == mFishData.mCoinParticle.CointParticleData)
            {
                return;
            }
            if (mFishData.mCoinParticle.CointParticleData.Id <= 0)
            {
                return;
            }

            CRenderTurret turret = mScene.getTurret(et_player_rpcid);

            if (turret == null)
            {
                return;
            }

            string coin_particle_name = mFishData.mCoinParticle.CointParticleData.ParticlePrefabName;
            int    radius             = mFishData.mCoinParticle.Radius;
            int    coin_count         = mFishData.mCoinParticle.CointCount;

            if (radius <= 0)
            {
                radius = 30;
            }
            if (coin_count <= 0)
            {
                coin_count = 1;
            }

            float layer = mScene.getLayerAlloter().getLayer(_eLevelLayer.Coin);

            StillParticle still_particle = mParticlemanager.newParticle(coin_particle_name);

            still_particle.setLayer(layer);
            still_particle.create(mCRenderFish.Position.logic2pixel(), turret.getTurretPos().logic2pixel(), coin_count, layer);
        }