mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 15:52:40 +08:00
@@ -197,7 +197,6 @@ cc.Class._fastDefine('cc.SpriteFrame', cc.SpriteFrame, []);
|
||||
cc.SpriteFrame.$super = cc.Asset;
|
||||
|
||||
prototype = cc.SpriteFrame.prototype;
|
||||
prototype._setTexture = prototype.setTexture;
|
||||
|
||||
cc.js.mixin(prototype, cc.EventTarget.prototype);
|
||||
|
||||
@@ -213,6 +212,18 @@ prototype._ctor = function (filename, rect, rotated, offset, originalSize) {
|
||||
}
|
||||
};
|
||||
|
||||
prototype._getTexture = prototype.getTexture;
|
||||
prototype.getTexture = function () {
|
||||
var tex = this._getTexture();
|
||||
this._texture = tex;
|
||||
return tex;
|
||||
};
|
||||
prototype.__setTexture = prototype.setTexture;
|
||||
prototype._setTexture = function (tex) {
|
||||
this.__setTexture(tex);
|
||||
this._texture = tex;
|
||||
};
|
||||
|
||||
prototype.textureLoaded = function () {
|
||||
return this.getTexture() !== null;
|
||||
};
|
||||
@@ -333,13 +344,6 @@ prototype._checkRect = function (texture) {
|
||||
}
|
||||
};
|
||||
|
||||
prototype._getTexture = prototype.getTexture;
|
||||
prototype.getTexture = function () {
|
||||
var tex = this._getTexture();
|
||||
this._texture = tex;
|
||||
return tex;
|
||||
};
|
||||
|
||||
prototype._clone = prototype.clone;
|
||||
prototype.clone = function () {
|
||||
var cloned = this._clone();
|
||||
|
||||
Reference in New Issue
Block a user