fix: sturdy walls
This commit is contained in:
parent
e13c8dfc66
commit
ebf3d2dc28
|
@ -132,22 +132,22 @@ export class Room extends decorate(class {}) {
|
|||
// Top.
|
||||
world.createBody((new RectangleShape()).fromJSON({
|
||||
position: [this.width / 2, -HALF_ROOM_BOUND_SIZE],
|
||||
size: [this.width, ROOM_BOUND_SIZE],
|
||||
size: [this.width + ROOM_BOUND_SIZE, ROOM_BOUND_SIZE],
|
||||
})),
|
||||
// Right.
|
||||
world.createBody((new RectangleShape()).fromJSON({
|
||||
position: [this.width + HALF_ROOM_BOUND_SIZE, this.height / 2],
|
||||
size: [ROOM_BOUND_SIZE, this.height],
|
||||
size: [ROOM_BOUND_SIZE, this.height + ROOM_BOUND_SIZE],
|
||||
})),
|
||||
// Bottom.
|
||||
world.createBody((new RectangleShape()).fromJSON({
|
||||
position: [this.width / 2, this.height + HALF_ROOM_BOUND_SIZE],
|
||||
size: [this.width, ROOM_BOUND_SIZE],
|
||||
size: [this.width + ROOM_BOUND_SIZE, ROOM_BOUND_SIZE],
|
||||
})),
|
||||
// Left.
|
||||
world.createBody((new RectangleShape()).fromJSON({
|
||||
position: [-HALF_ROOM_BOUND_SIZE, this.height / 2],
|
||||
size: [ROOM_BOUND_SIZE, this.height],
|
||||
size: [ROOM_BOUND_SIZE, this.height + ROOM_BOUND_SIZE],
|
||||
})),
|
||||
];
|
||||
this.bounds.forEach((bound) => {
|
||||
|
|
Loading…
Reference in New Issue
Block a user