zoukankan      html  css  js  c++  java
  • cocos2dx 11中粒子特效

     1 //爆炸粒子效果
     2         CCParticleSystem* particleSystem = CCParticleExplosion::create();
     3         particleSystem->setTexture(CCTextureCache::sharedTextureCache()->addImage("stars.png"));
     4         this->addChild(particleSystem);
     5 
     6         //火焰粒子效果
     7         CCParticleSystem* particleSystem = CCParticleFire::create();
     8         particleSystem->setTexture(CCTextureCache::sharedTextureCache()->addImage("fire.png"));
     9         this->addChild(particleSystem);
    10 
    11         //烟花粒子效果
    12         CCParticleSystem* particleSystem = CCParticleFireworks::create();
    13         particleSystem->setTexture(CCTextureCache::sharedTextureCache()->addImage("fire.png"));
    14         this->addChild(particleSystem);
    15 
    16         //星系粒子效果
    17         CCParticleSystem* particleSystem = CCParticleGalaxy::create();
    18         particleSystem->setTexture(CCTextureCache::sharedTextureCache()->addImage("fire.png"));
    19         this->addChild(particleSystem);
    20 
    21         //流星粒子效果
    22         CCParticleSystem* particleSystem = CCParticleMeteor::create();
    23         particleSystem->setTexture(CCTextureCache::sharedTextureCache()->addImage("fire.png"));
    24         this->addChild(particleSystem);
    25 
    26         //下雨粒子效果
    27         CCParticleSystem* particleSystem = CCParticleRain::create();
    28         particleSystem->setTexture(CCTextureCache::sharedTextureCache()->addImage("fire.png"));
    29         this->addChild(particleSystem);
    30 
    31         //烟雾粒子效果
    32         CCParticleSystem* particleSystem = CCParticleSmoke::create();
    33         particleSystem->setTexture(CCTextureCache::sharedTextureCache()->addImage("fire.png"));
    34         this->addChild(particleSystem);
    35 
    36         //下雪粒子效果
    37         CCParticleSystem* particleSystem = CCParticleSnow::create();
    38         particleSystem->setTexture(CCTextureCache::sharedTextureCache()->addImage("snow.png"));
    39         this->addChild(particleSystem);
    40 
    41         //漩涡粒子效果
    42         CCParticleSystem* particleSystem = CCParticleSpiral::create();
    43         particleSystem->setTexture(CCTextureCache::sharedTextureCache()->addImage("fire.png"));
    44         this->addChild(particleSystem);
    45 
    46         //太阳粒子效果
    47         CCParticleSystem* particleSystem = CCParticleSun::create();
    48         particleSystem->setTexture(CCTextureCache::sharedTextureCache()->addImage("fire.png"));
    49         this->addChild(particleSystem);
  • 相关阅读:
    struts2的核心和工作原理
    JAVA NIO学习笔记1
    [深入JUnit] 测试运行的入口
    阿里巴巴最新开源项目
    数据库进阶之路(五)
    flutter 常用plugins
    小程序 自定义组件 并实现组件间通讯
    小程序 背景叠阴影
    小程序 navigateTo传对象参数
    小程序 解决同行cell中 多点击事件冲突
  • 原文地址:https://www.cnblogs.com/newlist/p/3124170.html
Copyright © 2011-2022 走看看