Class cc.Layer
- Defined in: CCLayer.js
- Extends cc.Node
Constructor Attributes | Constructor Name and Description |
---|---|
cc.Layer()
cc.Layer is a subclass of cc.Node that implements the TouchEventsDelegate protocol.
|
Method Summary
Class Detail
cc.Layer()
cc.Layer is a subclass of cc.Node that implements the TouchEventsDelegate protocol.
All features from cc.Node are valid, plus the following new features:
It can receive iPhone Touches
It can receive Accelerometer input
All features from cc.Node are valid, plus the following new features:
It can receive iPhone Touches
It can receive Accelerometer input
Method Detail
-
bake()set the layer to cache all of children to a bake sprite, and draw itself by bake sprite. recommend using it in UI.
-
creates a layer
// Example var myLayer = cc.Layer.create(); //Yes! it's that simple
- Returns:
- {cc.Layer|Null}
-
ctor()Constructor of cc.Layer
-
{boolean} isBaked()Determines if the layer is baked.
- Returns:
- {boolean}
-
unbake()cancel the layer to cache all of children to a bake sprite.