Class cc.LayerMultiplex

Class Summary
Constructor Attributes Constructor Name and Description
 
CCMultipleLayer is a CCLayer with the ability to multiplex it's children.

Method Summary

Class Detail

cc.LayerMultiplex()
CCMultipleLayer is a CCLayer with the ability to multiplex it's children.
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}
  • {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'.
    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'.
    Parameters:
    {Number} n
    the layer index to switch to