Class cc.ParticleSystemQuad
Extends
cc.ParticleSystem.
Defined in: CCParticleSystemQuad.js.
Constructor Attributes | Constructor Name and Description |
---|---|
CCParticleSystemQuad is a subclass of CCParticleSystem |
Method Attributes | Method Name and Description |
---|---|
clone()
|
|
<static> |
cc.ParticleSystemQuad.create(pListFile)
creates an initializes a CCParticleSystemQuad from a plist file. |
ctor()
Constructor
|
|
draw(ctx)
draw particle
|
|
initTexCoordsWithRect(pointRect)
initilizes the texture with a rectangle measured Points |
|
initWithTotalParticles(numberOfParticles)
Initializes a system with a fixed number of particles
|
|
listen the event that coming to foreground on Android
|
|
postStep()
override cc.ParticleSystem
|
|
setBatchNode(batchNode)
|
|
setDisplayFrame(spriteFrame)
Sets a new CCSpriteFrame as particle. |
|
setTexture(texture, isCallSuper)
set Texture of Particle System
|
|
setTextureWithRect(texture, rect)
Sets a new texture with a rect.
|
|
initialices the indices for the vertices
|
|
updateQuadWithParticle(particle, newPosition)
update particle's quad
|
- Methods borrowed from class cc.ParticleSystem:
- addParticle, destroyParticleSystem, getAngle, getAngleVar, getAtlasIndex, getBatchNode, getBlendFunc, getBoundingBoxToWorld, getDrawMode, getDuration, getEmissionRate, getEmitterMode, getEndColor, getEndColorVar, getEndRadius, getEndRadiusVar, getEndSize, getEndSizeVar, getEndSpin, getEndSpinVar, getGravity, getLife, getLifeVar, getOpacityModifyRGB, getParticleCount, getPositionType, getPosVar, getRadialAccel, getRadialAccelVar, getRotatePerSecond, getRotatePerSecondVar, getShapeType, getSourcePosition, getSpeed, getSpeedVar, getStartColor, getStartColorVar, getStartRadius, getStartRadiusVar, getStartSize, getStartSizeVar, getStartSpin, getStartSpinVar, getTangentialAccel, getTangentialAccelVar, getTexture, getTotalParticles, init, initParticle, initWithDictionary, initWithFile, isActive, isAutoRemoveOnFinish, isBlendAdditive, isFull, resetSystem, setAngle, setAngleVar, setAtlasIndex, setAutoRemoveOnFinish, setBlendAdditive, setBlendFunc, setDrawMode, setDuration, setEmissionRate, setEmitterMode, setEndColor, setEndColorVar, setEndRadius, setEndRadiusVar, setEndSize, setEndSizeVar, setEndSpin, setEndSpinVar, setGravity, setLife, setLifeVar, setOpacityModifyRGB, setParticleCount, setPositionType, setPosVar, setRadialAccel, setRadialAccelVar, setRotatePerSecond, setRotatePerSecondVar, setRotation, setScale, setScaleX, setScaleY, setShapeType, setSourcePosition, setSpeed, setSpeedVar, setStartColor, setStartColorVar, setStartRadius, setStartRadiusVar, setStartSize, setStartSizeVar, setStartSpin, setStartSpinVar, setTangentialAccel, setTangentialAccelVar, stopSystem, update, updateWithNoTime
- Methods borrowed from class cc.Node:
- addChild, cleanup, convertToNodeSpace, convertToNodeSpaceAR, convertTouchToNodeSpace, convertTouchToNodeSpaceAR, convertToWorldSpace, convertToWorldSpaceAR, description, getActionByTag, getActionManager, getAnchorPoint, getAnchorPointInPoints, getBoundingBox, getCamera, getChildByTag, getChildren, getChildrenCount, getContentSize, getGLServerState, getGrid, getOrderOfArrival, getParent, getPosition, getPositionX, getPositionY, getRotation, getScale, getScaleX, getScaleY, getScheduler, getShaderProgram, getSkewX, getSkewY, getTag, getUserData, getUserObject, getVertexZ, getZOrder, ignoreAnchorPointForPosition, isIgnoreAnchorPointForPosition, isRunning, isVisible, nodeToParentTransform, nodeToWorldTransform, numberOfRunningActions, onEnter, onEnterTransitionDidFinish, onExit, onExitTransitionDidStart, parentToNodeTransform, pauseSchedulerAndActions, release, removeAllChildren, removeAllChildrenWithCleanup, removeChild, removeChildByTag, removeFromParent, removeFromParentAndCleanup, reorderChild, resumeSchedulerAndActions, retain, runAction, schedule, scheduleOnce, scheduleUpdate, scheduleUpdateWithPriority, setActionManager, setAnchorPoint, setContentSize, setGLServerState, setGrid, setNodeDirty, setOrderOfArrival, setParent, setPosition, setPositionX, setPositionY, setScheduler, setShaderProgram, setSkewX, setSkewY, setTag, setUserData, setUserObject, setVertexZ, setVisible, setZOrder, sortAllChildren, stopAction, stopActionByTag, stopAllActions, transform, transformAncestors, unschedule, unscheduleAllCallbacks, unscheduleUpdate, updateTransform, visit, worldToNodeTransform
CCParticleSystemQuad is a subclass of CCParticleSystem
It includes all the features of ParticleSystem.
Special features and Limitations:
- Particle size can be any float number.
- The system can be scaled
- The particles can be rotated
- It supports subrects
- It supports batched rendering since 1.1
//create a particle system this._emitter = new cc.ParticleSystemQuad(); this._emitter.initWithTotalParticles(150);
creates an initializes a CCParticleSystemQuad from a plist file.
This plist files can be creted manually or with Particle Designer:
http://particledesigner.71squared.com/
//creates an initializes a CCParticleSystemQuad from a plist file. var system = cc.ParticleSystemQuad.create("Images/SpinningPeas.plist");
- Parameters:
- {String} pListFile
- Returns:
- {cc.ParticleSystem}
- Parameters:
- {CanvasContext} ctx
- CanvasContext
initilizes the texture with a rectangle measured Points
pointRect should be in Texture coordinates, not pixel coordinates
- Parameters:
- {cc.Rect} pointRect
- Parameters:
- {Number} numberOfParticles
- Returns:
- {Boolean}
- Parameters:
- {cc.Class} obj
- Parameters:
- batchNode
Sets a new CCSpriteFrame as particle. WARNING: this method is experimental. Use setTexture:withRect instead.
- Parameters:
- {cc.SpriteFrame} spriteFrame
- Parameters:
- {HTMLImageElement|HTMLCanvasElement|cc.Texture2D} texture
- {Boolean} isCallSuper
- is direct call super method
- Parameters:
- {cc.Texture2D} texture
- {cc.Rect} rect
- Parameters:
- tp
- Parameters:
- {cc.Particle} particle
- {cc.Point} newPosition