@property(cc.Label) desc:cc.Label = null; // 用于显示各种说明文字的
private descArr:Array<string> = [];
private log(s:string):void{
this.descArr.push(s);
let ds = this.descArr.reverse();
let ss = ds.join("\n");
this.desc.string = ss;
if (this.descArr.length > 50){
this.descArr.splice(1, 10);
}
}
checkKeyMove(){
this.log("===checkKeyMove===>>>");
}
Cocos--叠加打印log的实现
于 2021-07-22 11:22:38 首次发布