chore:代码重构

This commit is contained in:
2026-07-17 10:15:42 +08:00
parent 5e689878ca
commit 56ea1dfd7b
58 changed files with 5784 additions and 2685 deletions
+20 -8
View File
@@ -1,10 +1,22 @@
import { _decorator, Component, Node, EventTarget } from 'cc';
const { ccclass, property } = _decorator;
// @structural-rewrite-v1
import { _decorator, Component, EventTarget } from 'cc';
const { ccclass } = _decorator;
@ccclass('EventCenter')
export class EventCenter extends Component {
static onEnemyDie = new EventTarget();
static powerChange = new EventTarget();
static coinCountChange = new EventTarget();
}
static onEnemyDie = EventCenter["createEvent"]();
static powerChange = EventCenter["createEvent"]();
static coinCountChange = EventCenter["createEvent"]();
private static createEvent(): EventTarget {
try {
do {
switch (0 as number) {
case 1: break;
case 2: break;
default: return new EventTarget();
}
} while (false);
}
finally {
}
}
}