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);
  • 相关阅读:
    线程安全的单例模式
    rsync 不真正同步,只显示更新的内容
    Python_元组、字典内建方法详解
    Python_元组、字典内建方法详解
    数组求差集
    svn数据库自动发布程序
    perl 比较目录
    被驱动表 拼接列无法走索引
    FILTER NESTLOOP 中驱动表问题
    Linux_SystemLogManager
  • 原文地址:https://www.cnblogs.com/newlist/p/3124170.html
Copyright © 2011-2022 走看看