测试用例更新

This commit is contained in:
YHH
2025-07-31 15:37:40 +08:00
parent 6ea366cfed
commit 69655f1936
16 changed files with 460 additions and 297 deletions

View File

@@ -5,8 +5,12 @@ import { EntitySystem } from '../../../src/ECS/Systems/EntitySystem';
import { ComponentTypeManager } from '../../../src/ECS/Utils/ComponentTypeManager';
class TestComponent extends Component {
constructor(public value: number = 0) {
public value: number = 0;
constructor(...args: unknown[]) {
super();
const [value = 0] = args as [number?];
this.value = value;
}
}
@@ -26,7 +30,7 @@ class TrackingSystem extends EntitySystem {
}
}
public override onChanged(entity: Entity): void {
public onChanged(entity: Entity): void {
this.onChangedCallCount++;
if (this.isInterestedEntity(entity)) {
if (!this.trackedEntities.includes(entity)) {