14.5粒子系统的实战

// 创建精灵类
	auto sprite = Sprite::create("taotaoahui.jpg");
	//sprite->setPosition(ccp(visibleSize.width / 2, visibleSize.height / 2));
	sprite->setAnchorPoint(ccp(0,0));
	addChild(sprite,1);


   // ParticleBatchNode 使用方法,
	 auto _emitter = ParticleSystemQuad::create("Particles/taotao.xml.particle.plist");// 首先创建ParticleSystemQuad或者ParticleSystem
	 _emitter->retain();
	 auto batch = ParticleBatchNode::createWithTexture(_emitter->getTexture());
	 batch->addChild(_emitter);
	 batch->setPosition(ccp(visibleSize.width /2 , visibleSize.height /2 ));	// sjt
	 this->addChild(batch, 10);

你可能感兴趣的:(14.5粒子系统的实战)