void Blocks::emittParticles(cocos2d::Layer *layer, cocos2d::Point point) { ParticleSystemQuad *emitter = ParticleSystemQuad::create("Json/XXX.plist"); emitter->retain(); emitter->setPosition(point); layer->addChild(emitter, PARTICLE_ZORDER); }
Node* NodeReader::loadParticle(const rapidjson::Value& json) { const char* filePath = DICTOOL->getStringValue_json(json, PLIST_FILE); int num = DICTOOL->getIntValue_json(json, PARTICLE_NUM); ParticleSystemQuad* particle = ParticleSystemQuad::create(filePath); particle->setTotalParticles(num); particle->retain(); initNode(particle, json); return particle; }