cocos creator 2.3.2
oppo支持最小平台版本号 1051
打包oppo小游戏,发现tween不能用!而且快应用调试报错自己不会打印error???
懵逼中,求帮测试
测试代码:
log只能打出“wc!!”
const { ccclass, property } = cc._decorator;
@ccclass
export default class NewClass extends cc.Component {
@property(cc.Label)
label: cc.Label = null;
@property
text: string = 'hello';
// LIFE-CYCLE CALLBACKS:
onLoad() {
var self = this
qg.setEnableDebug({
enableDebug: true, // true 为打开,false 为关闭
success: function () {
// 以下语句将会在 vConsole 面板输出
console.log("test consol log");
console.info("test console info");
console.warn("test consol warn");
console.debug("test consol debug");
console.error("test consol error");
},
complete: function () {
self.s = true
},
fail: function () {
}
});
}
s: boolean = false
t = cc.v3()
start() {
}
update(dt) {
if (this.s) {
this.s = false
console.log("wc!!");
console.log("wc", cc.Action.toString());
console.log("Tween", cc.Tween.toString());
console.log("tween", cc.tween.toString());
try {
const tw = cc.tween(this.t)
.set({ y: 0 })
.to(1, { y: 300 })
.to(1, { y: -300 })
.union()
.repeatForever()
.start()
console.log(JSON.stringify(tw));
} catch (e) {
console.error(JSON.stringify(e));
}
console.log(cc.tween.toString());
return
}
this.node.position = this.t
}
}