{"id":1628,"date":"2016-02-26T11:28:24","date_gmt":"2016-02-26T03:28:24","guid":{"rendered":"\/wp\/?p=1628"},"modified":"2016-02-26T11:29:23","modified_gmt":"2016-02-26T03:29:23","slug":"%e5%87%a0%e7%a7%8d%e7%b2%92%e5%ad%90%e6%95%88%e6%9e%9c","status":"publish","type":"post","link":"https:\/\/tixbay.net\/?p=1628","title":{"rendered":"\u51e0\u79cd\u7c92\u5b50\u6548\u679c"},"content":{"rendered":"<pre>\r\n    auto s = Director::getInstance()->getWinSize();\r\n     \r\n    auto sun = ParticleSun::create();\r\n    sun->setTexture(Director::getInstance()->getTextureCache()->addImage(fire.png));\r\n    sun->setPosition(Vec2(s.width \/ 2 -100, s.height \/ 2));\r\n     \r\n    sun->setTotalParticles(130);\r\n    sun->setLife(5.0f);\r\n     \r\n    this->addChild(sun);\r\n    \/\/ timers\r\n     \r\n     \r\n    auto fire = ParticleFire::create();\r\n    fire->setTexture(Director::getInstance()->getTextureCache()->addImage(fire.png));\r\n    fire->setPosition(Vec2(s.width \/ 2 + 50, s.height \/ 2));\r\n     \r\n    fire->setTotalParticles(130);\r\n    fire->setLife(5.0f);\r\n     \r\n    this->addChild(fire);\r\n     \r\n    auto fireworks = ParticleFireworks::create();\r\n    fireworks->setTexture(Director::getInstance()->getTextureCache()->addImage(fire.png));\r\n    fireworks->setPosition(Vec2(s.width \/ 2 + 50, s.height \/ 2 - 200));\r\n     \r\n    fireworks->setTotalParticles(130);\r\n    fireworks->setLife(5.0f);\r\n     \r\n    this->addChild(fireworks);\r\n     \r\n     \r\n    auto galaxy = ParticleGalaxy::create();\r\n    galaxy->setTexture(Director::getInstance()->getTextureCache()->addImage(fire.png));\r\n    galaxy->setPosition(Vec2( 50, s.height \/ 2 + 200));\r\n     \r\n    galaxy->setTotalParticles(130);\r\n    galaxy->setLife(5.0f);\r\n     \r\n    this->addChild(galaxy);\r\n     \r\n     \r\n \r\n    auto flower = ParticleFlower::create();\r\n    flower->setTexture(Director::getInstance()->getTextureCache()->addImage(fire.png));\r\n    flower->setPosition(Vec2( 250, s.height \/ 2 + 200));\r\n     \r\n    flower->setTotalParticles(130);\r\n    flower->setLife(5.0f);\r\n     \r\n    this->addChild(flower);\r\n     \r\n    \/\/\u6d41\u661f\r\n    auto meteor = ParticleMeteor::create();\r\n    meteor->setTexture(Director::getInstance()->getTextureCache()->addImage(fire.png));\r\n    meteor->setPosition(Vec2( 250, 20));\r\n     \r\n    meteor->setTotalParticles(130);\r\n    meteor->setLife(5.0f);\r\n     \r\n    this->addChild(meteor);\r\n     \r\n     \r\n    \/\/\u65cb\u6da1\r\n    auto spiral = ParticleSpiral::create();\r\n    spiral->setTexture(Director::getInstance()->getTextureCache()->addImage(fire.png));\r\n    spiral->setPosition(Vec2( 450, 40));\r\n     \r\n    spiral->setTotalParticles(130);\r\n    spiral->setLife(5.0f);\r\n     \r\n    this->addChild(spiral);\r\n    \r\n    \/\/\u7206\u70b8\r\n    auto explosion = ParticleExplosion::create();\r\n    explosion->setTexture(Director::getInstance()->getTextureCache()->addImage(fire.png));\r\n    explosion->setPosition(Vec2( 50, 440));\r\n     \r\n    explosion->setTotalParticles(130);\r\n    explosion->setLife(5.0f);\r\n     \r\n    this->addChild(explosion);\r\n     \r\n     \r\n    \/\/\u70df\u96fe\r\n    auto smoke = ParticleSmoke::create();\r\n    smoke->setTexture(Director::getInstance()->getTextureCache()->addImage(fire.png));\r\n    smoke->setPosition(Vec2( 450, 640));\r\n     \r\n    smoke->setTotalParticles(130);\r\n    smoke->setLife(5.0f);\r\n     \r\n    this->addChild(smoke);\r\n     \r\n    \/\/\u96ea\r\n    auto snow = ParticleSnow::create();\r\n    snow->setTexture(Director::getInstance()->getTextureCache()->addImage(fire.png));\r\n    snow->setPosition(Vec2( 450, 840));\r\n     \r\n    snow->setTotalParticles(130);\r\n    snow->setLife(5.0f);\r\n     \r\n    this->addChild(snow);\r\n \r\n    \/\/\u96e8\r\n    auto rain = ParticleRain::create();\r\n    rain->setTexture(Director::getInstance()->getTextureCache()->addImage(fire.png));\r\n    rain->setPosition(Vec2( 450, 940));\r\n     \r\n    rain->setTotalParticles(130);\r\n    rain->setLife(5.0f);\r\n     \r\n    this->addChild(rain);\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>auto s = Director::getInstance()->getWin &hellip;<\/p>\n<p class=\"read-more\"><a href=\"https:\/\/tixbay.net\/?p=1628\">\u7ee7\u7eed\u9605\u8bfb &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1628","post","type-post","status-publish","format-standard","hentry","category-moo"],"_links":{"self":[{"href":"https:\/\/tixbay.net\/index.php?rest_route=\/wp\/v2\/posts\/1628","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tixbay.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tixbay.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tixbay.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tixbay.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1628"}],"version-history":[{"count":2,"href":"https:\/\/tixbay.net\/index.php?rest_route=\/wp\/v2\/posts\/1628\/revisions"}],"predecessor-version":[{"id":1630,"href":"https:\/\/tixbay.net\/index.php?rest_route=\/wp\/v2\/posts\/1628\/revisions\/1630"}],"wp:attachment":[{"href":"https:\/\/tixbay.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1628"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tixbay.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1628"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tixbay.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1628"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}