mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 15:52:40 +08:00
@@ -1488,7 +1488,7 @@ cc.Director.PROJECTION_3D = 1;
|
||||
cc.Director.PROJECTION_CUSTOM = 3;
|
||||
|
||||
/**
|
||||
* Constant for default projection of cc.Director, default projection is 3D projection
|
||||
* Constant for default projection of cc.Director, default projection is 2D projection
|
||||
* @constant
|
||||
* @type {Number}
|
||||
*/
|
||||
|
||||
@@ -313,7 +313,7 @@ function doDefine (className, baseClass, mixins, options) {
|
||||
JS.extend(fireClass, baseClass); // 这里会把父类的 __props__ 复制给子类
|
||||
prototype = fireClass.prototype; // get extended prototype
|
||||
}
|
||||
fireClass.$super = baseClass;
|
||||
JS.value(fireClass, '$super', baseClass);
|
||||
if (CC_DEV && shouldAddProtoCtor) {
|
||||
prototype.ctor = function () {};
|
||||
}
|
||||
|
||||
@@ -326,7 +326,10 @@ if (CC_DEV) {
|
||||
return x.trim();
|
||||
});
|
||||
}
|
||||
js.getset(owner, prop, accessor.bind(null, getset[0]), getset[1] && accessor.bind(null, getset[1]));
|
||||
try {
|
||||
js.getset(owner, prop, accessor.bind(null, getset[0]), getset[1] && accessor.bind(null, getset[1]));
|
||||
}
|
||||
catch (e) {}
|
||||
}
|
||||
var getset = obj[prop];
|
||||
if (prop[0] === '*') {
|
||||
|
||||
@@ -178,7 +178,7 @@ exports.buildJsb = function (sourceFile, outputFile, jsbSkipModules, callback) {
|
||||
.pipe(Buffer())
|
||||
.pipe(Minifier(Utils.uglifyOptions(false, {
|
||||
CC_EDITOR: false,
|
||||
CC_DEV: false,
|
||||
CC_DEV: false, // CC_DEV should be false after build
|
||||
CC_TEST: false,
|
||||
CC_JSB: true
|
||||
}), UglifyHarmony))
|
||||
|
||||
@@ -89,7 +89,7 @@ cc.textureCache.removeTextureForKey = function (key) {
|
||||
// cc.Texture2D
|
||||
|
||||
cc.Class._fastDefine('cc.Texture2D', cc.Texture2D, []);
|
||||
cc.Texture2D.$super = cc.RawAsset;
|
||||
cc.js.value(cc.Texture2D, '$super', cc.RawAsset);
|
||||
|
||||
cc.Texture2D.WrapMode = cc.Enum({
|
||||
REPEAT: 0x2901,
|
||||
@@ -111,7 +111,7 @@ cc.js.get(prototype, 'pixelHeight', prototype.getPixelHeight);
|
||||
// cc.SpriteFrame
|
||||
|
||||
cc.Class._fastDefine('cc.SpriteFrame', cc.SpriteFrame, []);
|
||||
cc.SpriteFrame.$super = cc.Asset;
|
||||
cc.js.value(cc.SpriteFrame, '$super', cc.Asset);
|
||||
|
||||
prototype = cc.SpriteFrame.prototype;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user