@@ -247,7 +247,7 @@ cc.Node = cc.Class.extend(/** @lends cc.Node# */{
247
247
return ;
248
248
249
249
var i , len = array . length , node ;
250
- var nodeCallbackType = cc . Node . _StateCallbackType ;
250
+ var nodeCallbackType = cc . Node . _stateCallbackType ;
251
251
switch ( callbackType ) {
252
252
case nodeCallbackType . onEnter :
253
253
for ( i = 0 ; i < len ; i ++ ) {
@@ -1241,7 +1241,7 @@ cc.Node = cc.Class.extend(/** @lends cc.Node# */{
1241
1241
cc . eventManager . removeListeners ( this ) ;
1242
1242
1243
1243
// timers
1244
- this . _arrayMakeObjectsPerformSelector ( this . _children , cc . Node . _StateCallbackType . cleanup ) ;
1244
+ this . _arrayMakeObjectsPerformSelector ( this . _children , cc . Node . _stateCallbackType . cleanup ) ;
1245
1245
} ,
1246
1246
1247
1247
// composition: GET
@@ -1560,7 +1560,7 @@ cc.Node = cc.Class.extend(/** @lends cc.Node# */{
1560
1560
onEnter : function ( ) {
1561
1561
this . _isTransitionFinished = false ;
1562
1562
this . _running = true ; //should be running before resumeSchedule
1563
- this . _arrayMakeObjectsPerformSelector ( this . _children , cc . Node . _StateCallbackType . onEnter ) ;
1563
+ this . _arrayMakeObjectsPerformSelector ( this . _children , cc . Node . _stateCallbackType . onEnter ) ;
1564
1564
this . resume ( ) ;
1565
1565
} ,
1566
1566
@@ -1574,7 +1574,7 @@ cc.Node = cc.Class.extend(/** @lends cc.Node# */{
1574
1574
*/
1575
1575
onEnterTransitionDidFinish : function ( ) {
1576
1576
this . _isTransitionFinished = true ;
1577
- this . _arrayMakeObjectsPerformSelector ( this . _children , cc . Node . _StateCallbackType . onEnterTransitionDidFinish ) ;
1577
+ this . _arrayMakeObjectsPerformSelector ( this . _children , cc . Node . _stateCallbackType . onEnterTransitionDidFinish ) ;
1578
1578
} ,
1579
1579
1580
1580
/**
@@ -1584,7 +1584,7 @@ cc.Node = cc.Class.extend(/** @lends cc.Node# */{
1584
1584
* @function
1585
1585
*/
1586
1586
onExitTransitionDidStart : function ( ) {
1587
- this . _arrayMakeObjectsPerformSelector ( this . _children , cc . Node . _StateCallbackType . onExitTransitionDidStart ) ;
1587
+ this . _arrayMakeObjectsPerformSelector ( this . _children , cc . Node . _stateCallbackType . onExitTransitionDidStart ) ;
1588
1588
} ,
1589
1589
1590
1590
/**
@@ -1599,7 +1599,7 @@ cc.Node = cc.Class.extend(/** @lends cc.Node# */{
1599
1599
onExit : function ( ) {
1600
1600
this . _running = false ;
1601
1601
this . pause ( ) ;
1602
- this . _arrayMakeObjectsPerformSelector ( this . _children , cc . Node . _StateCallbackType . onExit ) ;
1602
+ this . _arrayMakeObjectsPerformSelector ( this . _children , cc . Node . _stateCallbackType . onExit ) ;
1603
1603
this . removeAllComponents ( ) ;
1604
1604
} ,
1605
1605
@@ -2020,7 +2020,7 @@ cc.Node = cc.Class.extend(/** @lends cc.Node# */{
2020
2020
*/
2021
2021
updateTransform : function ( ) {
2022
2022
// Recursively iterate over children
2023
- this . _arrayMakeObjectsPerformSelector ( this . _children , cc . Node . _StateCallbackType . updateTransform ) ;
2023
+ this . _arrayMakeObjectsPerformSelector ( this . _children , cc . Node . _stateCallbackType . updateTransform ) ;
2024
2024
} ,
2025
2025
2026
2026
/**
@@ -2213,7 +2213,7 @@ cc.Node = cc.Class.extend(/** @lends cc.Node# */{
2213
2213
* It should be set in initialize phase.
2214
2214
* </p>
2215
2215
* @function
2216
- * @param {cc.GLProgram } newShaderProgram The shader program which fetchs from CCShaderCache.
2216
+ * @param {cc.GLProgram } newShaderProgram The shader program which fetches from CCShaderCache.
2217
2217
* @example
2218
2218
* node.setGLProgram(cc.shaderCache.programForKey(cc.SHADER_POSITION_TEXTURECOLOR));
2219
2219
*/
@@ -2501,10 +2501,6 @@ cc.Node = cc.Class.extend(/** @lends cc.Node# */{
2501
2501
else
2502
2502
parentColor = cc . color . WHITE ;
2503
2503
this . updateDisplayedColor ( parentColor ) ;
2504
-
2505
- /*if (color.a !== undefined && !color.a_undefined) { //setColor doesn't support changing opacity, please use setOpacity
2506
- this.setOpacity(color.a);
2507
- }*/
2508
2504
} ,
2509
2505
2510
2506
/**
@@ -2608,7 +2604,7 @@ cc.Node.create = function () {
2608
2604
return new cc . Node ( ) ;
2609
2605
} ;
2610
2606
2611
- cc . Node . _StateCallbackType = { onEnter : 1 , onExit : 2 , cleanup : 3 , onEnterTransitionDidFinish : 4 , updateTransform : 5 , onExitTransitionDidStart : 6 , sortAllChildren : 7 } ;
2607
+ cc . Node . _stateCallbackType = { onEnter : 1 , onExit : 2 , cleanup : 3 , onEnterTransitionDidFinish : 4 , updateTransform : 5 , onExitTransitionDidStart : 6 , sortAllChildren : 7 } ;
2612
2608
2613
2609
if ( cc . _renderType === cc . _RENDER_TYPE_CANVAS ) {
2614
2610
//redefine cc.Node
0 commit comments