feat: 显示debug区域

This commit is contained in:
honmono
2022-10-22 10:43:38 +08:00
parent fdb002d00a
commit c2e3da2e7c
6 changed files with 15 additions and 11 deletions

View File

@@ -59,11 +59,12 @@ export default class RoleEventProcess extends EventProcess {
break;
case EventType.GraphicsDraw:
// if(cc.debug.isDisplayStats()) {
// this._graphicsDraw(event as EventGraphicsDraw);
// }else {
// this._graphicsDraw(null);
// }
if(cc.debug.isDisplayStats()) {
console.log('=====')
this._graphicsDraw(event as EventGraphicsDraw);
}else {
this._graphicsDraw(null);
}
break;

View File

@@ -40,13 +40,13 @@ export default class Main extends cc.Component {
}
onClick1() {
for(let i=0; i<10; i++) {
for(let i=0; i<1; i++) {
this.ecsController.createRoleEntity("Biker");
}
}
onClick2() {
for(let i=0; i<10; i++) {
for(let i=0; i<1; i++) {
this.ecsController.createRoleEntity("Cyborg");
}
}