2013-07-16 10:02:02 +08:00
// Deprecated functions
var cc = cc || { } ;
2013-07-16 10:14:52 +08:00
( function ( ) {
2013-07-16 10:02:02 +08:00
var logW = function ( old _name , new _name ) {
cc . log ( "\n********** \n" + old _name + " was deprecated, please use " + new _name + " instead.\n**********" ) ;
} ;
2013-07-16 14:43:20 +08:00
// Deprecated static functions
2013-07-16 10:02:02 +08:00
cc . AnimationCache . purgeSharedAnimationCache = function ( ) {
logW ( "cc.AnimationCache.purgeSharedAnimationCache" , "cc.AnimationCache.destroyInstance" ) ;
cc . AnimationCache . destroyInstance ( ) ;
} ;
2013-07-16 14:43:20 +08:00
// Deprecated member functions
cc . Action . prototype . copy = function ( ) {
logW ( "cc.Action.copy" , "cc.Action.clone" ) ;
return cc . Action . prototype . clone . apply ( this , arguments ) ;
} ;
2013-07-16 10:02:02 +08:00
2013-07-16 14:43:20 +08:00
cc . Animation . prototype . copy = function ( ) {
logW ( "cc.Animation.copy" , "cc.Animation.clone" ) ;
return cc . Animation . prototype . clone . apply ( this , arguments ) ;
} ;
2013-07-16 10:02:02 +08:00
2013-07-17 17:38:03 +08:00
cc . Node . prototype . nodeToWorldTransform = function ( ) {
logW ( "cc.Node.nodeToWorldTransform" , "cc.Node.getNodeToWorldTransform" ) ;
return cc . Node . prototype . getNodeToWorldTransform . apply ( this , arguments ) ;
} ;
cc . Node . prototype . nodeToParentTransform = function ( ) {
logW ( "cc.Node.nodeToParentTransform" , "cc.Node.getNodeToParentTransform" ) ;
return cc . Node . prototype . getNodeToParentTransform . apply ( this , arguments ) ;
} ;
cc . Node . prototype . worldToNodeTransform = function ( ) {
logW ( "cc.Node.worldToNodeTransform" , "cc.Node.getWorldToNodeTransform" ) ;
return cc . Node . prototype . getWorldToNodeTransform . apply ( this , arguments ) ;
} ;
cc . Node . prototype . parentToNodeTransform = function ( ) {
logW ( "cc.Node.parentToNodeTransform" , "cc.Node.getParentToNodeTransform" ) ;
return cc . Node . prototype . getParentToNodeTransform . apply ( this , arguments ) ;
} ;
2013-07-19 11:08:47 +08:00
cc . Node . prototype . numberOfRunningActions = function ( ) {
logW ( "cc.Node.numberOfRunningActions" , "cc.Node.getNumberOfRunningActions" ) ;
return cc . Node . prototype . getNumberOfRunningActions . apply ( this , arguments ) ;
} ;
cc . Node . prototype . numberOfRunningActionsInTarget = function ( ) {
logW ( "cc.Node.numberOfRunningActionsInTarget" , "cc.Node.getNumberOfRunningActionsInTarget" ) ;
return cc . Node . prototype . getNumberOfRunningActionsInTarget . apply ( this , arguments ) ;
} ;
2013-07-29 10:06:39 +08:00
cc . TMXTiledMap . prototype . propertiesForGID = function ( ) {
logW ( "cc.TMXTiledMap.propertiesForGID" , "cc.TMXTiledMap.getPropertiesForGID" ) ;
return cc . TMXTiledMap . prototype . getPropertiesForGID . apply ( this , arguments ) ;
} ;
2013-07-19 11:08:47 +08:00
2013-09-17 20:33:25 +08:00
cc . Menu . prototype . setHandlerPriority = function ( ) {
cc . log ( "cc.Menu.setHandlerPriority was deprecated, 3.0 uses new event dispatcher to dispatch touch event based on draw order, so setHandlerPriority is not needed now." ) ;
} ;
2013-07-16 10:14:52 +08:00
} ) ( ) ;