diff --git a/cocos2d/core/collider/CCCollisionManager.js b/cocos2d/core/collider/CCCollisionManager.js index e24c170593..be35bed8df 100644 --- a/cocos2d/core/collider/CCCollisionManager.js +++ b/cocos2d/core/collider/CCCollisionManager.js @@ -400,7 +400,7 @@ cc.js.getset(CollisionManager.prototype, 'enabledDebugDraw', } else if (!value && this._enabledDebugDraw) { this._debugDrawer.clear(); - cc.director.getScene()._sgNode.removeChild(this._debugDrawer); + this._debugDrawer.removeFromParent(false); cc.director.off(cc.Director.EVENT_AFTER_SCENE_LAUNCH, this.onSceneLaunched, this); } diff --git a/cocos2d/core/components/CCAnimation.js b/cocos2d/core/components/CCAnimation.js index 6743b41b2b..fbb01027ff 100644 --- a/cocos2d/core/components/CCAnimation.js +++ b/cocos2d/core/components/CCAnimation.js @@ -166,17 +166,16 @@ var Animation = cc.Class({ } }, - __preload: function () { - if (CC_EDITOR || !this.enabled) return; + onEnable: function () { + if (!CC_EDITOR && this.playOnLoad && this._defaultClip) { + this.playOnLoad = false; - if (this.playOnLoad && this._defaultClip) { var state = this.getAnimationState(this._defaultClip.name); this._animator.playState(state); } - }, - - onEnable: function () { - this.resume(); + else { + this.resume(); + } }, onDisable: function () { diff --git a/jsb/jsb-action.js b/jsb/jsb-action.js index f8f915f803..c89043a22c 100644 --- a/jsb/jsb-action.js +++ b/jsb/jsb-action.js @@ -348,6 +348,7 @@ var actionUpdate = { 'JumpTo': syncPositionUpdate, 'JumpBy': syncPositionUpdate, 'Place': syncPositionUpdate, + 'CardinalSplineTo': syncPositionUpdate, 'RotateTo': syncRotationUpdate, 'RotateBy': syncRotationUpdate, 'ScaleTo': syncScaleUpdate,