mirror of https://github.com/axmolengine/axmol.git
issue2405: Adding jsb_deprecated.js for the compatibility of deprecated variables and methods.
This commit is contained in:
parent
93e75bad9f
commit
a36a4bf19b
|
@ -1 +1 @@
|
||||||
16f9fcf29ae0c1b3a14728f0a11518f50355fb18
|
08ecad70e8370c7af451fddea1c59d05e80ca696
|
|
@ -1 +1 @@
|
||||||
6e5e943a982f3ba38f0119ff2a8a4d25f9c76945
|
cfc5c1f04972a605515e3e606ec7da4be4b75c2e
|
|
@ -12,3 +12,4 @@ require('jsb_opengl_constants.js');
|
||||||
require('jsb_opengl.js');
|
require('jsb_opengl.js');
|
||||||
require('jsb_cocosbuilder.js');
|
require('jsb_cocosbuilder.js');
|
||||||
require('jsb_sys.js');
|
require('jsb_sys.js');
|
||||||
|
require('jsb_deprecated.js');
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
// Deprecated functions
|
||||||
|
|
||||||
|
var cc = cc || {};
|
||||||
|
|
||||||
|
function() {
|
||||||
|
|
||||||
|
var logW = function(old_name, new_name) {
|
||||||
|
cc.log("\n********** \n"+old_name +" was deprecated, please use "+ new_name +" instead.\n**********");
|
||||||
|
};
|
||||||
|
|
||||||
|
cc.AnimationCache.purgeSharedAnimationCache = function() {
|
||||||
|
logW("cc.AnimationCache.purgeSharedAnimationCache", "cc.AnimationCache.destroyInstance");
|
||||||
|
cc.AnimationCache.destroyInstance();
|
||||||
|
};
|
||||||
|
|
||||||
|
// Example of deprecating a member function
|
||||||
|
// cc.TiledGrid3DAction.prototype.originalTile = function() {
|
||||||
|
// logW("cc.TiledGrid3DAction.prototype.originalTile", "cc.TiledGrid3DAction.prototype.getOriginalTile");
|
||||||
|
// return cc.TiledGrid3DAction.prototype.getOriginalTile.apply(this, arguments);
|
||||||
|
// };
|
||||||
|
|
||||||
|
|
||||||
|
}();
|
Loading…
Reference in New Issue