refactor: set world step time
This commit is contained in:
parent
fbbe8b00d1
commit
036bf6ad30
|
@ -105,6 +105,7 @@ export class App extends decorate(class {}) {
|
|||
this.simulationHandle = undefined;
|
||||
this.world = config.doPhysicsSimulation ? new World() : undefined;
|
||||
this.room.world = this.world;
|
||||
this.room.world.stepTime = config.simulationFrequency;
|
||||
// State synchronization.
|
||||
this.state = undefined;
|
||||
this.synchronizer = new Synchronizer({
|
||||
|
|
|
@ -20,6 +20,7 @@ export default class Game {
|
|||
this.entityPacketSynchronizer = new EntityPacketSynchronizer();
|
||||
// Room.
|
||||
this.room = createRoom();
|
||||
this.room.world.stepTime = config.simulationInterval;
|
||||
for (const entity of this.room.allEntities()) {
|
||||
this.onEntityAddedToRoom(entity);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user