- //粒子特效
- //爆炸效果
- CCParticleSystem*particleSystem=CCParticleExplosion::create();
- particleSystem->setTexture(CCTextureCache::sharedTextureCache()->addImage("stars.png"));
- addChild(particleSystem);
- //火焰效果
- CCParticleSystem*particleSystem=CCParticleFire::create();
- particleSystem->setTexture(CCTextureCache::sharedTextureCache()->addImage("fire.png"));
- addChild(particleSystem);
- //花束效果
- CCParticleSystem*particleSystem=CCParticleFlower::create();
- particleSystem->setTexture(CCTextureCache::sharedTextureCache()->addImage("fire.png"));
- //烟花效果
- CCParticleSystem*particleSystem=CCParticleFireworks::create();
- //星系效果
- CCParticleSystem*particleSystem=CCParticlegalaxy::create();
- //流星效果
- CCParticleSystem*particleSystem=CCParticleMeteor::create();
- //下雨效果
- CCParticleSystem*particleSystem=CCParticleRain::create();
- //烟雾效果
- CCParticleSystem*particleSystem=CCParticleSmoke::create();
- //下雪效果
- CCParticleSystem*particleSystem=CCParticleSNow::create();
- particleSystem->setTexture(CCTextureCache::sharedTextureCache()->addImage("sNow.png"));
- //漩涡效果
- CCParticleSystem*particleSystem=CCParticleSpiral::create();
- //太阳效果
- CCParticleSystem*particleSystem=CCParticleSun::create();
- addChild(particleSystem);
原文地址:https://www.jb51.cc/cocos2dx/341633.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。