axmol/tools/tolua++/CCParticleSystem.pkg

159 lines
4.5 KiB
Plaintext
Raw Normal View History

enum {
kCCParticleDurationInfinity = -1,
kCCParticleStartSizeEqualToEndSize = -1,
kCCParticleStartRadiusEqualToEndRadius = -1,
kParticleStartSizeEqualToEndSize = kCCParticleStartSizeEqualToEndSize,
kParticleDurationInfinity = kCCParticleDurationInfinity,
};
enum {
kCCParticleModeGravity,
kCCParticleModeRadius,
};
typedef enum {
kCCPositionTypeFree,
kCCPositionTypeRelative,
kCCPositionTypeGrouped,
}tCCPositionType;
enum {
kPositionTypeFree = kCCPositionTypeFree,
kPositionTypeGrouped = kCCPositionTypeGrouped,
};
2012-02-02 14:26:38 +08:00
class CCParticleSystem : public CCNode
{
// mode A
const CCPoint& getGravity();
void setGravity(const CCPoint& g);
float getSpeed();
void setSpeed(float speed);
float getSpeedVar();
void setSpeedVar(float speed);
float getTangentialAccel();
void setTangentialAccel(float t);
float getTangentialAccelVar();
void setTangentialAccelVar(float t);
float getRadialAccel();
void setRadialAccel(float t);
float getRadialAccelVar();
void setRadialAccelVar(float t);
// mode B
float getStartRadius();
void setStartRadius(float startRadius);
float getStartRadiusVar();
void setStartRadiusVar(float startRadiusVar);
float getEndRadius();
void setEndRadius(float endRadius);
float getEndRadiusVar();
void setEndRadiusVar(float endRadiusVar);
float getRotatePerSecond();
void setRotatePerSecond(float degrees);
float getRotatePerSecondVar();
void setRotatePerSecondVar(float degrees);
bool addParticle();
void initParticle(tCCParticle* particle);
void stopSystem();
void resetSystem();
bool isFull();
void updateQuadWithParticle(tCCParticle* particle, const CCPoint& newPosition);
void postStep();
unsigned int getParticleCount();
float getDuration();
void setDuration(float d);
CCPoint getSourcePosition();
void setSourcePosition(CCPoint pos);
CCPoint getPosVar();
void setPosVar(CCPoint pos);
float getLife();
void setLife(float life);
float getLifeVar();
void setLifeVar(float lifeVar);
float getAngle();
void setAngle(float angle);
float getAngleVar();
void setAngleVar(float angle);
float getStartSize();
void setStartSize(float size);
float getStartSizeVar();
void setStartSizeVar(float size);
float getEndSize();
void setEndSize(float size);
float getEndSizeVar();
void setEndSizeVar(float size);
void setStartColor(ccColor4F var);
const ccColor4F & getStartColor();
void setStartColorVar(ccColor4F var);
const ccColor4F & getStartColorVar();
void setEndColor(ccColor4F var);
const ccColor4F & getEndColor();
void setEndColorVar(ccColor4F var);
const ccColor4F & getEndColorVar();
void setStartSpin(float var);
float getStartSpin();
void setStartSpinVar(float var);
float getStartSpinVar();
void setEndSpin(float var);
float getEndSpin();
void setEndSpinVar(float var);
float getEndSpinVar();
void setEmissionRate(float rate);
float getEmissionRate();
unsigned int getTotalParticles();
bool isAutoRemoveOnFinish();
void setAutoRemoveOnFinish(bool var);
int getEmitterMode();
void setEmitterMode(int mode);
2012-02-02 14:26:38 +08:00
CCTexture2D* getTexture(void);
void setTexture(CCTexture2D* var);
ccBlendFunc getBlendFunc(void);
void setBlendFunc(ccBlendFunc var);
2012-06-15 17:26:11 +08:00
void setScale(float s);
void setRotation(float newRotation);
void setScaleX(float newScaleX);
void setScaleY(float newScaleY);
2012-06-15 17:26:11 +08:00
bool isActive();
bool isBlendAdditive();
void setBlendAdditive(bool value);
CCParticleBatchNode* getBatchNode(void);
void setBatchNode(CCParticleBatchNode* node);
tCCPositionType getPositionType(void);
void setPositionType(tCCPositionType type);
bool initWithFile(const char* plistFile);
bool initWithTotalParticles(unsigned int number);
static CCParticleSystem * create(const char *plistFile);
};
class CCParticleSystemQuad : public CCParticleSystem
{
CCParticleSystemQuad(void);
void postStep();
void setDisplayFrame(CCSpriteFrame* spriteFrame);
void setTexture(CCTexture2D* texture);
void setTextureWithRect(CCTexture2D *texture, const CCRect& rect);
void setBatchNode(CCParticleBatchNode* batchNode);
void setTotalParticles(unsigned int tp);
void updateQuadWithParticle(tCCParticle* particle, const CCPoint& newPosition);
void postStep();
void setTotalParticles(unsigned int tp);
static CCParticleSystemQuad * create(const char *plistFile);
static CCParticleSystemQuad * create();
};