Skip to content

Commit

Permalink
fix crashing bug in some igloos
Browse files Browse the repository at this point in the history
  • Loading branch information
sky-is-winning committed Jun 19, 2024
1 parent f654c0c commit cec3224
Show file tree
Hide file tree
Showing 103 changed files with 675 additions and 576 deletions.
2 changes: 2 additions & 0 deletions src/scenes/igloos/IglooScene.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ export default class IglooScene extends RoomScene {

super.create()
if (this.floor) this.floor.depth = -2
if (this.floor1) this.floor1.depth = -3
if (this.floor2) this.floor2.depth = -4

if (this.args.flooring) this.updateFlooring(this.args.flooring)
this.addLocation()
Expand Down
6 changes: 6 additions & 0 deletions src/scenes/igloos/backyard/Backyard-preview.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import IglooScene from '../IglooScene'
import {Button, MoveTo} from '@components/components'

/* START OF COMPILED CODE */

export default class Backyard extends IglooScene {
Expand All @@ -21,6 +22,11 @@ export default class Backyard extends IglooScene {
/* END-USER-CTR-CODE */
}

/** @returns {void} */
_preload() {
this.load.pack('backyard-pack', 'client/media/igloos/buildings/sprites/backyard/backyard-pack.json')
}

/** @returns {void} */
_create() {
// floor
Expand Down
1 change: 1 addition & 0 deletions src/scenes/igloos/bamboohut/BambooHut-preview.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import IglooScene from '../IglooScene'
import {Button, MoveTo} from '@components/components'

/* START OF COMPILED CODE */

export default class BambooHut extends IglooScene {
Expand Down
2 changes: 1 addition & 1 deletion src/scenes/igloos/bamboohut/BambooHut.scene
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"superClassName": "IglooScene",
"preloadMethodName": "_preload",
"preloadPackFiles": [
"yukon/client/media/igloos/buildings/sprites/bamboohut/bamboohut-pack.json"
"client/media/igloos/buildings/sprites/bamboohut/bamboohut-pack.json"
],
"createMethodName": "_create",
"sceneKey": "BambooHut",
Expand Down
2 changes: 1 addition & 1 deletion src/scenes/igloos/basic/Basic.scene
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"superClassName": "IglooScene",
"preloadMethodName": "_preload",
"preloadPackFiles": [
"yukon/client/media/igloos/buildings/sprites/basic/basic-pack.json"
"client/media/igloos/buildings/sprites/basic/basic-pack.json"
],
"createMethodName": "_create",
"sceneKey": "Basic",
Expand Down
1 change: 1 addition & 0 deletions src/scenes/igloos/beachparty/BeachParty-preview.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import IglooScene from '../IglooScene'
import {Button, MoveTo} from '@components/components'

/* START OF COMPILED CODE */

export default class BeachParty extends IglooScene {
Expand Down
1 change: 1 addition & 0 deletions src/scenes/igloos/bigcandy/BigCandy-preview.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import IglooScene from '../IglooScene'
import {Button, MoveTo} from '@components/components'

/* START OF COMPILED CODE */

export default class BigCandy extends IglooScene {
Expand Down
2 changes: 1 addition & 1 deletion src/scenes/igloos/bigcandy/BigCandy.scene
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"superClassName": "IglooScene",
"preloadMethodName": "_preload",
"preloadPackFiles": [
"yukon/client/media/igloos/buildings/sprites/bigcandy/bigcandy-pack.json"
"client/media/igloos/buildings/sprites/bigcandy/bigcandy-pack.json"
],
"createMethodName": "_create",
"sceneKey": "BigCandy",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import IglooScene from '../IglooScene'
import {Button, MoveTo} from '@components/components'

/* START OF COMPILED CODE */

export default class BlackPuffleTreeHouse extends IglooScene {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import IglooScene from '../IglooScene'
import {Button, MoveTo} from '@components/components'

/* START OF COMPILED CODE */

export default class BluePuffleTreeHouse extends IglooScene {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import IglooScene from '../IglooScene'
import {Button, MoveTo} from '@components/components'

/* START OF COMPILED CODE */

export default class BrownPuffleTreeHouse extends IglooScene {
Expand Down
1 change: 1 addition & 0 deletions src/scenes/igloos/candy/Candy-preview.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import IglooScene from '../IglooScene'
import {Button, MoveTo} from '@components/components'

/* START OF COMPILED CODE */

export default class Candy extends IglooScene {
Expand Down
2 changes: 1 addition & 1 deletion src/scenes/igloos/candy/Candy.scene
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"superClassName": "IglooScene",
"preloadMethodName": "_preload",
"preloadPackFiles": [
"yukon/client/media/igloos/buildings/sprites/candy/candy-pack.json"
"client/media/igloos/buildings/sprites/candy/candy-pack.json"
],
"createMethodName": "_create",
"sceneKey": "Candy",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import IglooScene from '../IglooScene'
import {Button, MoveTo} from '@components/components'

/* START OF COMPILED CODE */

export default class CandySplitLevel extends IglooScene {
Expand Down
1 change: 1 addition & 0 deletions src/scenes/igloos/cave/Cave-preview.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import IglooScene from '../IglooScene'
import {Button, MoveTo} from '@components/components'

/* START OF COMPILED CODE */

export default class Cave extends IglooScene {
Expand Down
1 change: 1 addition & 0 deletions src/scenes/igloos/circus/Circus-preview.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import IglooScene from '../IglooScene'
import {Button, MoveTo} from '@components/components'

/* START OF COMPILED CODE */

export default class Circus extends IglooScene {
Expand Down
1 change: 1 addition & 0 deletions src/scenes/igloos/cozycottage/CozyCottage-preview.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import IglooScene from '../IglooScene'
import {Button, MoveTo} from '@components/components'

/* START OF COMPILED CODE */

export default class CozyCottage extends IglooScene {
Expand Down
1 change: 1 addition & 0 deletions src/scenes/igloos/cpairliner/CPAirliner-preview.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import IglooScene from '../IglooScene'
import {Button, MoveTo} from '@components/components'

/* START OF COMPILED CODE */

export default class CPAirliner extends IglooScene {
Expand Down
1 change: 1 addition & 0 deletions src/scenes/igloos/creepycavern/CreepyCavern-preview.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import IglooScene from '../IglooScene'
import {Button, MoveTo} from '@components/components'

/* START OF COMPILED CODE */

export default class CreepyCavern extends IglooScene {
Expand Down
1 change: 1 addition & 0 deletions src/scenes/igloos/deluxeblue/DeluxeBlue-preview.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import IglooScene from '../IglooScene'
import {Button, MoveTo} from '@components/components'

/* START OF COMPILED CODE */

export default class DeluxeBlue extends IglooScene {
Expand Down
2 changes: 1 addition & 1 deletion src/scenes/igloos/deluxeblue/DeluxeBlue.scene
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"superClassName": "IglooScene",
"preloadMethodName": "_preload",
"preloadPackFiles": [
"yukon/client/media/igloos/buildings/sprites/deluxeblue/deluxeblue-pack.json"
"client/media/igloos/buildings/sprites/deluxeblue/deluxeblue-pack.json"
],
"createMethodName": "_create",
"sceneKey": "DeluxeBlue",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import IglooScene from '../IglooScene'
import {Button, MoveTo} from '@components/components'

/* START OF COMPILED CODE */

export default class DeluxeGingerbreadHouse extends IglooScene {
Expand Down
1 change: 1 addition & 0 deletions src/scenes/igloos/deluxesnow/DeluxeSnow-preview.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import IglooScene from '../IglooScene'
import {Button, MoveTo} from '@components/components'

/* START OF COMPILED CODE */

export default class DeluxeSnow extends IglooScene {
Expand Down
2 changes: 1 addition & 1 deletion src/scenes/igloos/deluxesnow/DeluxeSnow.scene
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"superClassName": "IglooScene",
"preloadMethodName": "_preload",
"preloadPackFiles": [
"yukon/client/media/igloos/buildings/sprites/deluxesnow/deluxesnow-pack.json"
"client/media/igloos/buildings/sprites/deluxesnow/deluxesnow-pack.json"
],
"createMethodName": "_create",
"sceneKey": "DeluxeSnow",
Expand Down
1 change: 1 addition & 0 deletions src/scenes/igloos/deluxestone/DeluxeStone-preview.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import IglooScene from '../IglooScene'
import {Button, MoveTo} from '@components/components'

/* START OF COMPILED CODE */

export default class DeluxeStone extends IglooScene {
Expand Down
2 changes: 1 addition & 1 deletion src/scenes/igloos/deluxestone/DeluxeStone.scene
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"superClassName": "IglooScene",
"preloadMethodName": "_preload",
"preloadPackFiles": [
"yukon/client/media/igloos/buildings/sprites/deluxestone/deluxestone-pack.json"
"client/media/igloos/buildings/sprites/deluxestone/deluxestone-pack.json"
],
"createMethodName": "_create",
"sceneKey": "DeluxeStone",
Expand Down
1 change: 1 addition & 0 deletions src/scenes/igloos/dojo/Dojo-preview.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import IglooScene from '../IglooScene'
import {Button, MoveTo} from '@components/components'

/* START OF COMPILED CODE */

export default class Dojo extends IglooScene {
Expand Down
1 change: 1 addition & 0 deletions src/scenes/igloos/dragonslair/DragonsLair-preview.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import IglooScene from '../IglooScene'
import {Button, MoveTo} from '@components/components'

/* START OF COMPILED CODE */

export default class DragonsLair extends IglooScene {
Expand Down
1 change: 1 addition & 0 deletions src/scenes/igloos/eeriecastle/EerieCastle-preview.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import IglooScene from '../IglooScene'
import {Button, MoveTo} from '@components/components'

/* START OF COMPILED CODE */

export default class EerieCastle extends IglooScene {
Expand Down
1 change: 1 addition & 0 deletions src/scenes/igloos/empty/Empty-preview.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import IglooScene from '../IglooScene'
import {Button, MoveTo} from '@components/components'

/* START OF COMPILED CODE */

export default class Empty extends IglooScene {
Expand Down
1 change: 1 addition & 0 deletions src/scenes/igloos/estate/Estate-preview.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import IglooScene from '../IglooScene'
import {Button, MoveTo} from '@components/components'

/* START OF COMPILED CODE */

export default class Estate extends IglooScene {
Expand Down
1 change: 1 addition & 0 deletions src/scenes/igloos/ezrashideout/EzrasHideout-preview.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import IglooScene from '../IglooScene'
import {Button, MoveTo} from '@components/components'

/* START OF COMPILED CODE */

export default class EzrasHideout extends IglooScene {
Expand Down
1 change: 1 addition & 0 deletions src/scenes/igloos/fishbowl/FishBowl-preview.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import IglooScene from '../IglooScene'
import {Button, MoveTo} from '@components/components'

/* START OF COMPILED CODE */

export default class FishBowl extends IglooScene {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import IglooScene from '../IglooScene'
import {Button, MoveTo} from '@components/components'

/* START OF COMPILED CODE */

export default class FreshBakedGingerbreadHouse extends IglooScene {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import IglooScene from '../IglooScene'
import {Button, MoveTo} from '@components/components'

/* START OF COMPILED CODE */

export default class FrostBitePalace extends IglooScene {
Expand Down
1 change: 1 addition & 0 deletions src/scenes/igloos/ghostlycavern/GhostlyCavern-preview.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import IglooScene from '../IglooScene'
import {Button, MoveTo} from '@components/components'

/* START OF COMPILED CODE */

export default class GhostlyCavern extends IglooScene {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import IglooScene from '../IglooScene'
import {Button, MoveTo} from '@components/components'
import {SimpleButton, MoveTo} from '@components/components'

/* START OF COMPILED CODE */

export default class GingerbreadHouse extends IglooScene {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import IglooScene from '../IglooScene'
import {Button, MoveTo} from '@components/components'

/* START OF COMPILED CODE */

export default class GoldPuffleTreeHouse extends IglooScene {
Expand Down
1 change: 1 addition & 0 deletions src/scenes/igloos/greenclover/GreenClover-preview.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import IglooScene from '../IglooScene'
import {Button, MoveTo} from '@components/components'

/* START OF COMPILED CODE */

export default class GreenClover extends IglooScene {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import IglooScene from '../IglooScene'
import {Button, MoveTo} from '@components/components'

/* START OF COMPILED CODE */

export default class GreenPuffleTreeHouse extends IglooScene {
Expand Down
1 change: 1 addition & 0 deletions src/scenes/igloos/greyicecastle/GreyIceCastle-preview.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import IglooScene from '../IglooScene'
import {Button, MoveTo} from '@components/components'

/* START OF COMPILED CODE */

export default class GreyIceCastle extends IglooScene {
Expand Down
34 changes: 17 additions & 17 deletions src/scenes/igloos/gym/Gym-preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ export default class Gym extends IglooScene {
constructor() {
super(`Gym-preview-${Date.now()}${Phaser.Math.Between(0, 10000)}`)

/** @type {Phaser.GameObjects.Layer} */
/** @type {Phaser.GameObjects.Image} */
this.floor2
/** @type {Phaser.GameObjects.Image} */
this.floor1
/** @type {Phaser.GameObjects.Image} */
this.floor

/* START-USER-CTR-CODE */
Expand All @@ -28,24 +32,18 @@ export default class Gym extends IglooScene {

/** @returns {void} */
_create() {
// floor
const floor = this.add.layer()

// wood_1
const wood_1 = this.add.image(1342, 742, 'gym', 'wood')
wood_1.setOrigin(0.5084745762711864, 0.5185185185185185)
wood_1.flipX = true
floor.add(wood_1)
// floor2
const floor2 = this.add.image(1342, 742, 'gym', 'wood')
floor2.setOrigin(0.5084745762711864, 0.5185185185185185)
floor2.flipX = true

// wood
const wood = this.add.image(177, 742, 'gym', 'wood')
wood.setOrigin(0.5084745762711864, 0.5185185185185185)
floor.add(wood)
// floor1
const floor1 = this.add.image(177, 742, 'gym', 'wood')
floor1.setOrigin(0.5084745762711864, 0.5185185185185185)

// floor_1
const floor_1 = this.add.image(760, 753, 'gym', 'floor')
floor_1.setOrigin(0.5004095004095004, 0.5)
floor.add(floor_1)
// floor
const floor = this.add.image(760, 753, 'gym', 'floor')
floor.setOrigin(0.5004095004095004, 0.5)

// wall
const wall = this.add.image(760, 400, 'gym', 'wall')
Expand All @@ -55,6 +53,8 @@ export default class Gym extends IglooScene {
const door = this.add.image(339, 571, 'gym', 'door')
door.setOrigin(0.5084745762711864, 0.5)

this.floor2 = floor2
this.floor1 = floor1
this.floor = floor

this.events.emit('scene-awake')
Expand Down
Loading

0 comments on commit cec3224

Please sign in to comment.