diff --git a/cocos2d/core/CCNode.js b/cocos2d/core/CCNode.js index 1de85ae2ce..babf572ced 100644 --- a/cocos2d/core/CCNode.js +++ b/cocos2d/core/CCNode.js @@ -1909,11 +1909,12 @@ var Node = cc.Class({ * * @method getDisplayedOpacity * @returns {number} displayed opacity + * @deprecated please use opacity property, cascade opacity is removed * @example * var displayOpacity = node.getDisplayedOpacity(); */ getDisplayedOpacity () { - return this._sgNode.getDisplayedOpacity(); + return this.opacity; }, /** @@ -1927,11 +1928,12 @@ var Node = cc.Class({ * * @method getDisplayedColor * @returns {Color} + * @deprecated please use color property, cascade color is not supported * @example * var displayColor = node.getDisplayedColor(); */ getDisplayedColor () { - return this._sgNode.getDisplayedColor(); + return this.color; }, _updateLocalMatrix () { diff --git a/cocos2d/tilemap/CCTiledMap.js b/cocos2d/tilemap/CCTiledMap.js index 6ae1f6ce2a..1514d770f4 100644 --- a/cocos2d/tilemap/CCTiledMap.js +++ b/cocos2d/tilemap/CCTiledMap.js @@ -430,7 +430,6 @@ let TiledMap = cc.Class({ }, _applyFile () { - let sgNode = this._sgNode; let file = this._tmxFile; let self = this; if (file) { diff --git a/test/qunit/unit-es5/test-component-scheduler.js b/test/qunit/unit-es5/test-component-scheduler.js index 5426f979e5..96a838b146 100644 --- a/test/qunit/unit-es5/test-component-scheduler.js +++ b/test/qunit/unit-es5/test-component-scheduler.js @@ -2,7 +2,7 @@ largeModule('Component Scheduler', { setup: SetupEngine.setup, teardown: function () { cc.director._scene = new cc.Scene(); - cc.director._runningScene = cc.director._scene._sgNode; + cc.director._runningScene = cc.director._scene; SetupEngine.teardown(); } }); diff --git a/test/qunit/unit-es5/test-prefab-sync.js b/test/qunit/unit-es5/test-prefab-sync.js index 801476d987..1c8a8e482c 100644 --- a/test/qunit/unit-es5/test-prefab-sync.js +++ b/test/qunit/unit-es5/test-prefab-sync.js @@ -157,9 +157,6 @@ strictEqual(reloadedParent.active, false, 'root active should be kept'); strictEqual(reloadedParent.children.length, 1, 'children should be synced'); - // test parent sgNode - strictEqual(reloadedParent._sgNode.parent === scene._sgNode, true, 'parent of parent _sgNode should be synced'); - // test child var syncedChild = reloadedParent.children[0]; strictEqual(syncedChild.active, child.active, 'child active should be synced'); @@ -167,9 +164,6 @@ strictEqual(syncedChild.y, child.y, 'child position should be synced'); strictEqual(syncedChild.scaleY, child.scaleY, 'child scale should be synced'); strictEqual(syncedChild.parent, reloadedParent, 'prefab reference should redirect to scene node'); - - // test child sgNode - strictEqual(syncedChild._sgNode.parent === reloadedParent._sgNode, true, 'parent of child _sgNode should be synced'); }); })(); diff --git a/test/qunit/unit-es5/test-prefab.js b/test/qunit/unit-es5/test-prefab.js index e30b23fa83..2c4dc6e032 100644 --- a/test/qunit/unit-es5/test-prefab.js +++ b/test/qunit/unit-es5/test-prefab.js @@ -209,7 +209,6 @@ strictEqual(testNode.childrenCount, 2, 'Should create removed node'); var created = testNode.children[1]; - ok(created._sgNode, 'Checking created node'); var comp = created.getComponent(MyComponent); comp.resetExpect(CallbackTester.OnLoad, 'call onLoad while attaching to node'); diff --git a/test/qunit/unit-es5/test-spriteRenderer.js b/test/qunit/unit-es5/test-spriteRenderer.js index 773b31f9e3..6d57188253 100644 --- a/test/qunit/unit-es5/test-spriteRenderer.js +++ b/test/qunit/unit-es5/test-spriteRenderer.js @@ -9,7 +9,7 @@ test('basic test', function () { node.color = Color.RED; var render = node.addComponent(cc.Sprite); - deepEqual(render._sgNode.color, Color.RED, 'color set success'); + deepEqual(node.color, Color.RED, 'color set success'); var newSprite = new cc.SpriteFrame(); var texture = cc.textureUtil.loadImage(url);