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);
  • 相关阅读:
    6.基础控件
    5.对话框组合
    4.对话框程序
    3. MFC原理介绍
    三星曲面显示器
    笔记本光驱接口怎么外接台式机硬盘?
    笔记本usb外接3.5寸sata台式机硬盘, 用mhdd检测不到,怎么处理?
    MHDD检测不到硬盘的解决办法
    MHDD检测电脑硬盘坏道
    一个指向指针函数的函数指针
  • 原文地址:https://www.cnblogs.com/newlist/p/3124170.html
Copyright © 2011-2022 走看看