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);
  • 相关阅读:
    HDU6030 Happy Necklace(推导+矩阵快速幂)
    威尔逊定理总结
    卢卡斯定理总结
    扩展欧几里得总结
    HDU2602 Bone Collector(01背包)
    离散数学--集合论
    Linux超全实用指令大全
    HDU6715 算术(莫比乌斯反演)
    莫比乌斯反演总结
    k8s-基于kubeasz项目二进制部署k8s集群
  • 原文地址:https://www.cnblogs.com/newlist/p/3124170.html
Copyright © 2011-2022 走看看