| 536 | } |
| 537 | |
| 538 | @Injectable() |
| 539 | @ECSSystem('Consumer') |
| 540 | class ConsumerSystem extends EntitySystem implements IService { |
| 541 | @InjectProperty(TestService) |
| 542 | service!: TestService; |
| 543 | |
| 544 | private initializeValue = 0; |
| 545 | |
| 546 | constructor() { |
| 547 | super(Matcher.empty()); |
| 548 | } |
| 549 | |
| 550 | protected override onInitialize(): void { |
| 551 | this.initializeValue = this.service.value; |
| 552 | } |
| 553 | |
| 554 | public getInitializeValue(): number { |
| 555 | return this.initializeValue; |
| 556 | } |
| 557 | |
| 558 | override dispose() {} |
| 559 | } |
| 560 | |
| 561 | scene.addEntityProcessor(TestService); |
| 562 | const consumer = scene.addEntityProcessor(ConsumerSystem); |
nothing calls this directly
no test coverage detected