昨天发现1.8.2在destroyTexture的时候,出现一个很大的坑,没法填(同时for循环release大量object的时候会crash)。后来实在没办法,改用1.9.3尝试,结果一切正常,浩浩荡荡走上更改引擎版本的道路。(以下忽略搬运项目时的SDK等代码几百万行……)
不会有问题的版本:1.8.2
有问题的版本:1.9.3
测试情况:
WEB情况–>正常
模拟器情况–>正常
调试模式真机情况–>正常
IOS+安卓 非调试模式下报以下错误:
ERROR: TypeError: (d.instance = this)._super is not a function. (In ‘(d.instance = this)._super()’, ‘(d.instance = this)._super’ is null), location: src/project.js:
下周上线,感觉自己快要被祭天了,求救求救!!
贴上basePage代码:
var gconfig = require(“gameConfig”);
var app = require(“app”);
var basePage = cc.Class({
extends: cc.Component,
properties: {
closeBtn: cc.Button,
bgNode: cc.Node,
},
statics: {
instance: null,
prefabPath: "",
showPage: function(pparams, pparent){
}
}
},
},
onLoad: function (){
this.creatMask();
this.handleUI();
},
onEnable: function(){
},
handleUI: function(){
},
// 创建遮罩
creatMask: function(bclose, popacity){
},
setParams: function(pparams){
},
onClose: function(){
},
onDestroy: function(){
--G.gPrefabZindex;
},
});
module.exports = basePage;
使用时的方法:
var basePage = require(“basePage”);
var noticePage = cc.Class({
extends: basePage,
properties: {
contentLabel: cc.Label,
},
statics: {
prefabPath: "noticepage",
},
onLoad () {
noticePage.instance = this;
this._super();
},
handleUI () {
this._super();
},