Cocos2d 粒子系统对应 EffectHub Cocos2dx 特效编辑器 可以直接在项目中使用的参数模板

   //粒子编辑器

   //初始化粒子个数
   auto TestParticle = ParticleSystemQuad::createWithTotalParticles(289);

   //设置粒子纹理图片
   TestParticle->setTexture(TextureCache::getInstance()->addImage("smoke.png"));

   //设置混合模式主要设置src和dst参数
   ccBlendFunc blend;
   blend.src = GL_DST_ALPHA;
   blend.dst = GL_ONE;
   TestParticle->setBlendFunc(blend);

   //设置开始时候的粒子大小以及偏差
   TestParticle->setStartSize(111);
   TestParticle->setStartSizeVar(10);
   
   //设置粒子结束时候大小以及偏差
   TestParticle->setEndSize(40.0f);
   TestParticle->setEndSizeVar(0);

   //粒子自身旋转
   TestParticle->setStartSpin(720);
   TestParticle->setStartSpinVar(683);
   TestParticle->setEndSpin(0);
   TestParticle->setEndSpinVar(0);

   //设置开始时候的颜色以及偏差
   TestParticle->setStartColor(Color4F(1, 0.4, 0.69, 1));
   TestParticle->setStartColorVar(Color4F(0, 0, 0.2, 0.1));

   //设置结束时候的颜色以及偏差
   TestParticle->setEndColor(Color4F(0, 0, 0, 1));
   TestParticle->setEndColorVar(Colo
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值