mirror of https://github.com/axmolengine/axmol.git
Merge branch 'work1'
This commit is contained in:
commit
585792f3da
|
@ -51,6 +51,12 @@ public:
|
|||
:m_pVertices(NULL)
|
||||
{}
|
||||
virtual ~CCParticleSystemPoint();
|
||||
|
||||
/** creates an initializes a CCParticleSystemPoint from a plist file.
|
||||
This plist files can be creted manually or with Particle Designer:
|
||||
*/
|
||||
static CCParticleSystemPoint * particleWithFile(const char *plistFile);
|
||||
|
||||
// super methods
|
||||
virtual bool initWithTotalParticles(int numberOfParticles);
|
||||
virtual void updateQuadWithParticle(tCCParticle* particle, CCPoint newPosition);
|
||||
|
|
|
@ -60,6 +60,12 @@ public:
|
|||
,m_pIndices(NULL)
|
||||
{}
|
||||
virtual ~CCParticleSystemQuad();
|
||||
|
||||
/** creates an initializes a CCParticleSystemQuad from a plist file.
|
||||
This plist files can be creted manually or with Particle Designer:
|
||||
*/
|
||||
static CCParticleSystemQuad * particleWithFile(const char *plistFile);
|
||||
|
||||
/** initialices the indices for the vertices*/
|
||||
void initIndices();
|
||||
|
||||
|
|
|
@ -60,6 +60,20 @@ CCParticleSystemPoint::~CCParticleSystemPoint()
|
|||
glDeleteBuffers(1, &m_uVerticesID);
|
||||
#endif
|
||||
}
|
||||
|
||||
// implementation CCParticleSystemPoint
|
||||
CCParticleSystemPoint * CCParticleSystemPoint::particleWithFile(const char *plistFile)
|
||||
{
|
||||
CCParticleSystemPoint *pRet = new CCParticleSystemPoint();
|
||||
if (pRet && pRet->initWithFile(plistFile))
|
||||
{
|
||||
pRet->autorelease();
|
||||
return pRet;
|
||||
}
|
||||
CC_SAFE_DELETE(pRet)
|
||||
return pRet;
|
||||
}
|
||||
|
||||
void CCParticleSystemPoint::updateQuadWithParticle(tCCParticle* particle, CCPoint newPosition)
|
||||
{
|
||||
// place vertices and colos in array
|
||||
|
|
|
@ -32,7 +32,6 @@ THE SOFTWARE.
|
|||
namespace cocos2d {
|
||||
|
||||
//implementation CCParticleSystemQuad
|
||||
|
||||
// overriding the init method
|
||||
bool CCParticleSystemQuad::initWithTotalParticles(int numberOfParticles)
|
||||
{
|
||||
|
@ -88,6 +87,19 @@ CCParticleSystemQuad::~CCParticleSystemQuad()
|
|||
#endif
|
||||
}
|
||||
|
||||
// implementation CCParticleSystemQuad
|
||||
CCParticleSystemQuad * CCParticleSystemQuad::particleWithFile(const char *plistFile)
|
||||
{
|
||||
CCParticleSystemQuad *pRet = new CCParticleSystemQuad();
|
||||
if (pRet && pRet->initWithFile(plistFile))
|
||||
{
|
||||
pRet->autorelease();
|
||||
return pRet;
|
||||
}
|
||||
CC_SAFE_DELETE(pRet)
|
||||
return pRet;
|
||||
}
|
||||
|
||||
// rect should be in Texture coordinates, not pixel coordinates
|
||||
void CCParticleSystemQuad::initTexCoordsWithRect(CCRect pointRect)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue