MCPcopy Create free account
hub / github.com/esengine/esengine / PhysicsSystem

Class PhysicsSystem

packages/core/tests/ECS/EntitySystemDI.test.ts:85–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83 }
84
85 @Injectable()
86 @ECSSystem('Physics')
87 class PhysicsSystem extends EntitySystem implements IService {
88 @InjectProperty(CollisionSystem)
89 public collision!: CollisionSystem;
90
91 constructor() {
92 super(Matcher.empty().all(Transform, Velocity));
93 }
94
95 protected override process(entities: readonly Entity[]): void {
96 this.collision.checkCollisions();
97 }
98
99 override dispose() {}
100 }
101
102 scene.addEntityProcessor(CollisionSystem);
103 const physics = scene.addEntityProcessor(PhysicsSystem);

Callers

nothing calls this directly

Calls 3

InjectableFunction · 0.90
ECSSystemFunction · 0.90
InjectPropertyFunction · 0.90

Tested by

no test coverage detected