Class Index | File Index

Classes


Class cc.ParallaxNode


Extends cc.Node.

Defined in: CCParallaxNode.js.

Class Summary
Constructor Attributes Constructor Name and Description
 

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 Summary
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
 
 
Remove all children with cleanup
 
removeChild(child, cleanup)
Remove Child
 
 
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());
Parameters:
{cc.Node} child
{Number} z
{cc.Point} ratio
{cc.Point} offset

<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

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Jan 09 2013 07:51:52 GMT-0800 (PST)