Class cc.LayerMultiplex
Extends
cc.Layer.
Defined in: CCLayer.js.
Constructor Attributes | Constructor Name and Description |
---|---|
CCMultipleLayer is a CCLayer with the ability to multiplex it's children.
|
Method Attributes | Method Name and Description |
---|---|
addLayer(layer)
|
|
<static> |
cc.LayerMultiplex.create()
creates a cc.LayerMultiplex with one or more layers using a variable argument list.
|
ctor()
Constructor
|
|
initWithLayer(layer)
|
|
initWithLayers(args)
|
|
switchTo(n)
switches to a certain layer indexed by n.
|
|
release the current layer and switches to another layer indexed by n.
|
- Methods borrowed from class cc.Layer:
- didAccelerate, getMousePriority, getTouchMode, getTouchPriority, init, isAccelerometerEnabled, isKeyboardEnabled, isMouseEnabled, isTouchEnabled, onEnter, onEnterTransitionDidFinish, onExit, onMouseDown, onMouseDragged, onMouseEntered, onMouseExited, onMouseMoved, onMouseUp, onOtherMouseDown, onOtherMouseDragged, onOtherMouseUp, onRightMouseDown, onRightMouseDragged, onRightMouseUp, onScrollWheel, onTouchBegan, onTouchCancelled, onTouchEnded, onTouchesBegan, onTouchesCancelled, onTouchesEnded, onTouchesMoved, onTouchMoved, registerWithTouchDispatcher, setAccelerometerEnabled, setKeyboardEnabled, setMouseEnabled, setMousePriority, setTouchEnabled, setTouchMode, setTouchPriority
- Methods borrowed from class cc.Node:
- addChild, 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, isIgnoreAnchorPointForPosition, isRunning, isVisible, nodeToParentTransform, nodeToWorldTransform, numberOfRunningActions, 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, 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, visit, worldToNodeTransform
Class Detail
cc.LayerMultiplex()
CCMultipleLayer is a CCLayer with the ability to multiplex it's children.
Features:
Features:
- - It supports one or more children
- - Only one children will be active a time
Method Detail
addLayer(layer)
- Parameters:
- {cc.Layer} layer
<static>
{cc.LayerMultiplex|Null}
cc.LayerMultiplex.create()
creates a cc.LayerMultiplex with one or more layers using a variable argument list.
// Example var multiLayer = cc.LayerMultiple.create(layer1, layer2, layer3);//any number of layers
- Returns:
- {cc.LayerMultiplex|Null}
ctor()
Constructor
{Boolean}
initWithLayer(layer)
- Parameters:
- {cc.Layer} layer
- Deprecated:
- merged with initWithLayers
- Returns:
- {Boolean}
{Boolean}
initWithLayers(args)
- Parameters:
- {Array} args
- an array of cc.Layer
- Returns:
- {Boolean}
switchTo(n)
switches to a certain layer indexed by n.
The current (old) layer will be removed from it's parent with 'cleanup:YES'.
The current (old) layer will be removed from it's parent with 'cleanup:YES'.
- Parameters:
- {Number} n
- the layer index to switch to
switchToAndReleaseMe(n)
release the current layer and switches to another layer indexed by n.
The current (old) layer will be removed from it's parent with 'cleanup:YES'.
The current (old) layer will be removed from it's parent with 'cleanup:YES'.
- Parameters:
- {Number} n
- the layer index to switch to