Skip to content

Commit

Permalink
fix flooring
Browse files Browse the repository at this point in the history
  • Loading branch information
sky-is-winning committed Jun 4, 2024
1 parent 8d89983 commit 5e7b5e4
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/scenes/igloos/IglooScene.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,18 @@ export default class IglooScene extends RoomScene {
if (this.flooring) this.flooring.destroy()
if (!this.roomPhysics.mask) return

if (!this.textures.list[`flooring/${flooring}`].frames[`${this.floorFrame}_1`]) this.floorFrame = 1
this.flooring = this.add.image(0, 0, `flooring/${flooring}`, `${this.floorFrame}_1`)
let floorFrame = this.floorFrame
let fakeFrame = false
if (!this.textures.list[`flooring/${flooring}`].frames[`${this.floorFrame}_1`]) {
floorFrame = 1
fakeFrame = true
}
this.flooring = this.add.image(0, 0, `flooring/${flooring}`, `${floorFrame}_1`)
if (fakeFrame) {
this.flooring.setScale(2)
this.flooring.setX(-760)
this.flooring.setY(-720)
}
this.flooring.depth = -1

let mask = this.createMask()
Expand Down

0 comments on commit 5e7b5e4

Please sign in to comment.