fix: ID
This commit is contained in:
parent
2d8a966849
commit
12bf7cb65e
|
@ -1,3 +1,3 @@
|
|||
export default {
|
||||
world: {defaultValue: -1, type: 'uint16'},
|
||||
world: 'uint16',
|
||||
}
|
||||
|
|
|
@ -105,7 +105,7 @@ export default class System {
|
|||
this.ecs.removeMany(entities);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
return new WrappedSystem();
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ const players = {
|
|||
Momentum: {},
|
||||
Position: {x: 50, y: 50},
|
||||
VisibleAabb: {},
|
||||
World: {world: 0},
|
||||
World: {world: 1},
|
||||
Sprite: {image: '/assets/bunny.png'},
|
||||
},
|
||||
};
|
||||
|
@ -36,7 +36,7 @@ export default class Engine {
|
|||
ecs.addSystem(CalculateAabbs);
|
||||
ecs.addSystem(UpdateSpatialHash);
|
||||
this.ecses = {
|
||||
0: ecs,
|
||||
1: ecs,
|
||||
};
|
||||
this.connections = [];
|
||||
this.connectedPlayers = new Map();
|
||||
|
|
|
@ -6,7 +6,7 @@ import Engine from './engine.js';
|
|||
|
||||
test('visibility-based updates', async () => {
|
||||
const engine = new Engine(Server);
|
||||
const ecs = engine.ecses[0];
|
||||
const ecs = engine.ecses[1];
|
||||
// Create an entity.
|
||||
const entity = ecs.get(ecs.create({
|
||||
Momentum: {x: 1, y: 0},
|
||||
|
|
Loading…
Reference in New Issue
Block a user