Class cc.ParallaxNode
Extends
cc.Node.
Defined in: CCParallaxNode.js.
Constructor Attributes | Constructor Name and Description |
---|---|
cc.ParallaxNode: A node that simulates a parallax scroller |
Method Attributes | Method Name and Description |
---|---|
addChild(child, z, ratio, offset)
Adds a child to the container with a z-order, a parallax ratio and a position offset
It returns self, so you can chain several addChilds.
|
|
<static> |
cc.ParallaxNode.create()
|
ctor()
Constructor
|
|
removeAllChildren(cleanup)
Remove all children with cleanup
|
|
removeChild(child, cleanup)
Remove Child
|
|
setParallaxArray(value)
|
|
visit()
Visit
|
- Methods borrowed from class cc.Node:
- cleanup, convertToNodeSpace, convertToNodeSpaceAR, convertTouchToNodeSpace, convertTouchToNodeSpaceAR, convertToWorldSpace, convertToWorldSpaceAR, description, draw, getActionByTag, getActionManager, getAnchorPoint, getAnchorPointInPoints, getBoundingBox, getBoundingBoxToWorld, 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, init, isIgnoreAnchorPointForPosition, isRunning, isVisible, nodeToParentTransform, nodeToWorldTransform, numberOfRunningActions, onEnter, onEnterTransitionDidFinish, onExit, onExitTransitionDidStart, parentToNodeTransform, pauseSchedulerAndActions, release, removeAllChildrenWithCleanup, removeChildByTag, removeFromParent, removeFromParentAndCleanup, reorderChild, resumeSchedulerAndActions, retain, runAction, schedule, scheduleOnce, scheduleUpdate, scheduleUpdateWithPriority, setActionManager, setAnchorPoint, setContentSize, setGLServerState, setGrid, setNodeDirty, setOrderOfArrival, setParent, setPosition, setPositionX, setPositionY, setRotation, setScale, setScaleX, setScaleY, setScheduler, setShaderProgram, setSkewX, setSkewY, setTag, setUserData, setUserObject, setVertexZ, setVisible, setZOrder, sortAllChildren, stopAction, stopActionByTag, stopAllActions, transform, transformAncestors, unschedule, unscheduleAllCallbacks, unscheduleUpdate, update, updateTransform, worldToNodeTransform
Class Detail
cc.ParallaxNode()
cc.ParallaxNode: A node that simulates a parallax scroller
The children will be moved faster / slower than the parent according the the parallax ratio.
Method Detail
addChild(child, z, ratio, offset)
Adds a child to the container with a z-order, a parallax ratio and a position offset
It returns self, so you can chain several addChilds.
//example voidNode.addChild(background, -1, cc.p(0.4, 0.5), cc.PointZero());
<static>
{cc.ParallaxNode}
cc.ParallaxNode.create()
//example var voidNode = cc.ParallaxNode.create();
- Returns:
- {cc.ParallaxNode}
ctor()
Constructor
{Array}
getParallaxArray()
- Returns:
- {Array}
removeAllChildren(cleanup)
Remove all children with cleanup
- Parameters:
- {Boolean} cleanup
removeChild(child, cleanup)
Remove Child
//example voidNode.removeChild(background,true);
- Parameters:
- {cc.Node} child
- {Boolean} cleanup
setParallaxArray(value)
- Parameters:
- {Array} value
visit()
Visit