看不出来,是不是内存占用溢出了
换3.8.2
换那个helloworld先看看
什么helloworld
官方教程helloworld,最简单的例程,跑一下长时间后看看是否正常也
if (this.syz != null) {
tween(this.syz).to(0.5, new Vec3(-1800, 0)).call(() => {
this.syz.destroy();
}).start();
}
this.zyz = instantiate(this.ka);
this.zyz.position = new Vec3(1800, 0);
this.zyz.parent = this.node.getChildByName("background");
this.ggl = this.zyz.getChildByName("Mask");
if (GameConfig.gqmz == "guan010") {
this.ggl = this.zyz.getChildByName("Mask1");
}
tween(this.zyz).to(0.5, new Vec3(0, 0)).call(() => {
this.dj = false;
this.zyz.getComponent(GameConfig.gqmz).tzbl = true;
this.kq = false;
this.zyz.on(Input.EventType.TOUCH_START, (e: EventTouch) => {
this.node.getChildByName("jinbi-shou").active = true;
this.node.getChildByName("jinbi-shou").worldPosition = new Vec3(e.getUILocation().x + 45, e.getUILocation().y + 42);
})
this.zyz.on(Input.EventType.TOUCH_MOVE, (e: EventTouch) => {
this.node.getChildByName("jinbi-shou").active = true;
this.node.getChildByName("jinbi-shou").worldPosition = new Vec3(e.getUILocation().x + 45, e.getUILocation().y + 42);
})
this.zyz.on(Input.EventType.TOUCH_END, (e: EventTouch) => {
this.node.getChildByName("jinbi-shou").active = false;
this.node.getChildByName("jinbi-shou").worldPosition = new Vec3(e.getUILocation().x + 45, e.getUILocation().y + 42);
})
this.zyz.on(Input.EventType.TOUCH_CANCEL, (e: EventTouch) => {
this.node.getChildByName("jinbi-shou").active = false;
this.node.getChildByName("jinbi-shou").worldPosition = new Vec3(e.getUILocation().x + 45, e.getUILocation().y + 42);
})
if (this.model == "auto") {
let b = setTimeout(() => {
this.checkjiang();
clearTimeout(b);
}, 500);
}
}).start();
这是我那个报错的函数的代码
我换成3.8.2后tween直接失效了,onupdate直接报错了

