Rooms, items and some player stuff

This commit is contained in:
2021-11-04 20:58:37 +01:00
parent 36bb9264b3
commit a745ff299e
277 changed files with 14665 additions and 5 deletions

View File

@@ -0,0 +1,40 @@
import { World } from '../ecs/index';
export class ECSWorld {
constructor(instance) {
this.instance = instance;
this.running = true;
this.id = 'ECSScene';
this.world = new World();
}
update() {
if (this.running)
this.world.run();
}
updateDraw() {
return true;
}
createEntity(components) {
return this.world.createEntity(components);
}
createComponent(props) {
return this.world.createComponent(props);
}
createSystem(systemExecutor) {
return this.world.createSystem(systemExecutor);
}
addSystem(system) {
return this.world.addSystem(system);
}
addEntity(entity) {
this.world.addEntity(entity);
}
removeEntity(entity) {
return this.world.removeEntity(entity);
}
createQuery(include, exclude) {
return this.world.createQuery(include, exclude);
}
extendEntity(entity, components) {
return this.world.extendEntity(entity, components);
}
}