Skip to content

Commit

Permalink
Assets y escenas base (WIP)
Browse files Browse the repository at this point in the history
- Preparados y precargados  assets de los fondos de todas las escenas (comentados para que no tarde demasiado en cargar)
- Creada clase base para todas las escenas (hay que completarlas)
- Modificado baseScene para colocar la cámara en el centro por defecto y para poder pasar callbacks al método de abrir las puertas
- Modificados bedroomBase y livingroomBase para usar dichos cambios
  • Loading branch information
MattCastUCM committed Jul 23, 2024
1 parent ab21f85 commit 26c7c38
Show file tree
Hide file tree
Showing 103 changed files with 549 additions and 80 deletions.
Binary file added assets/backgrounds/bathroom/bathroomBg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/backgrounds/bathroom/stolenPhone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/backgrounds/classBack/backChar1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/backgrounds/classBack/backChar10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/backgrounds/classBack/backChar11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/backgrounds/classBack/backChar12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/backgrounds/classBack/backChar13.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/backgrounds/classBack/backChar14.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/backgrounds/classBack/backChar15.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/backgrounds/classBack/backChar2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/backgrounds/classBack/backChar3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/backgrounds/classBack/backChar4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/backgrounds/classBack/backChar5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/backgrounds/classBack/backChar6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/backgrounds/classBack/backChar7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/backgrounds/classBack/backChar8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/backgrounds/classBack/backChar9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/backgrounds/classBack/backRow1Chairs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/backgrounds/classBack/backRow1Tables.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/backgrounds/classBack/backRow2Chairs.png
Binary file added assets/backgrounds/classBack/backRow2Tables.png
Binary file added assets/backgrounds/classBack/backRow3Chairs.png
Binary file added assets/backgrounds/classBack/backRow3Tables.png
Binary file added assets/backgrounds/classBack/backRow4Chairs.png
Binary file added assets/backgrounds/classBack/backRow4Tables.png
Binary file added assets/backgrounds/classBack/backRow5Chairs.png
Binary file added assets/backgrounds/classBack/backRow5Tables.png
Binary file added assets/backgrounds/classBack/blackboardPic1.png
Binary file added assets/backgrounds/classBack/blackboardPic3.png
Binary file added assets/backgrounds/classBack/classBackBg.png
Binary file added assets/backgrounds/classBack/classDoorClosed.png
Binary file added assets/backgrounds/classBack/classDoorOpened.png
Binary file added assets/backgrounds/classFront/classFrontBg.png
Binary file added assets/backgrounds/classFront/frontChar1.png
Binary file added assets/backgrounds/classFront/frontChar10.png
Binary file added assets/backgrounds/classFront/frontChar11.png
Binary file added assets/backgrounds/classFront/frontChar12.png
Binary file added assets/backgrounds/classFront/frontChar13.png
Binary file added assets/backgrounds/classFront/frontChar14.png
Binary file added assets/backgrounds/classFront/frontChar15.png
Binary file added assets/backgrounds/classFront/frontChar2.png
Binary file added assets/backgrounds/classFront/frontChar3.png
Binary file added assets/backgrounds/classFront/frontChar4.png
Binary file added assets/backgrounds/classFront/frontChar5.png
Binary file added assets/backgrounds/classFront/frontChar6.png
Binary file added assets/backgrounds/classFront/frontChar7.png
Binary file added assets/backgrounds/classFront/frontChar8.png
Binary file added assets/backgrounds/classFront/frontChar9.png
Binary file added assets/backgrounds/corridor/boysDoorClosed.png
Binary file added assets/backgrounds/corridor/boysDoorOpened.png
Binary file added assets/backgrounds/corridor/classDoorClosed.png
Binary file added assets/backgrounds/corridor/classDoorOpened.png
Binary file added assets/backgrounds/corridor/corridorBg.png
Binary file added assets/backgrounds/corridor/girlsDoorClosed.png
Binary file added assets/backgrounds/corridor/girlsDoorOpened.png
Binary file added assets/backgrounds/nightmares/gum.png
Binary file added assets/backgrounds/nightmares/gumChair.png
Binary file added assets/backgrounds/nightmares/nightmaresBg.png
Binary file added assets/backgrounds/nightmares/nightmaresChair.png
Binary file added assets/backgrounds/playground/earring.png
Binary file added assets/backgrounds/stairs/stairsBg.png
Binary file added assets/backgrounds/stairs/stairsDoorClosed.png
Binary file added assets/backgrounds/stairs/stairsDoorOpened.png
21 changes: 21 additions & 0 deletions localization/day1/livingroomMorningDay1.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,5 +121,26 @@
"type": "text",
"character": "mom"
}
},


"door": {
"root": {
"type": "condition",
"conditions": [
{
"next": "noBag",
"bagPicked": {
"value": false,
"operator": "equal",
"default": false
}
}
]
},
"noBag": {
"type": "text",
"character": "player"
}
}
}
8 changes: 6 additions & 2 deletions localization/en/day1/livingroomMorningDay1.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@
"text": "Está en tu cuarto, cogela y vete ya."
}
]
}
},


"door": {
"noBag": {
"text": "Me dejo la mochila. Será mejor que pases por mi habitación a recogerla antes de irme."
}
}
}
7 changes: 6 additions & 1 deletion localization/es/day1/livingroomMorningDay1.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,12 @@
"text": "Está en tu cuarto, cogela y vete ya."
}
]
}
},

"door": {
"noBag": {
"text": "Me dejo la mochila. Será mejor que pases por mi habitación a recogerla antes de irme."
}
}

}
10 changes: 7 additions & 3 deletions src/game.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ import TextOnlyScene from './scenes/textOnlyScene.js';
import AlarmScene from './scenes/gameLoop/alarmScene.js';
import BedroomMorningDay1 from './scenes/gameLoop/day1/bedroomMorningDay1.js';
import LivingroomMorningDay1 from './scenes/gameLoop/day1/livingroomMorningDay1.js';
import PlaygroundMorningDay1 from './scenes/gameLoop/day1/playgroundMorningDay1.js';
import StairsMorningDay1 from './scenes/gameLoop/day1/stairsMorningDay1.js';
import CorridorMorningDay1 from './scenes/gameLoop/day1/corridorMorningDay1.js';

import ComputerScene from './UI/computer/computerScene.js'

Expand All @@ -27,9 +30,10 @@ const config = {
// Nota: el orden de las escenas es relevante. Las que se encuentran delante, se renderizan delante
scene: [
BootScene, LanguageMenu, TitleMenu, UserInfoMenu,
TextOnlyScene, AlarmScene, BedroomMorningDay1, LivingroomMorningDay1,
Test, TestMenu, ComputerScene,
UIManager,],
TextOnlyScene, AlarmScene,
BedroomMorningDay1, LivingroomMorningDay1, PlaygroundMorningDay1, StairsMorningDay1, CorridorMorningDay1,
Test, TestMenu,
ComputerScene, UIManager,],
autoFocus: true,
disableContextMenu: true, // Desactivar que aparezca el menu de inspeccionar al hacer click derecho
render: {
Expand Down
6 changes: 3 additions & 3 deletions src/managers/gameManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default class GameManager {
this.blackboard = new Map();

this.bagPicked = "bagPicked";
this.blackboard.set("bagPicked", false);
this.blackboard.set(this.bagPicked, false);

this.isLate = "isLate";
this.blackboard.set(this.isLate, false);
Expand Down Expand Up @@ -239,7 +239,7 @@ export default class GameManager {
this.computerScene.scene.sleep();


let sceneName = 'LivingroomMorningDay1';
let sceneName = 'StairsMorningDay1';

// Pasa a la escena inicial con los parametros text, onComplete y onCompleteDelay
// let sceneName = 'TextOnlyScene';
Expand Down Expand Up @@ -315,7 +315,7 @@ export default class GameManager {
// Se cambia a la escena actual de vuelta, que deberia ser la
// habitacion, y deberia ponerse la camara en la izquierda
let params = {
left: true
camPos: "left"
};
this.currentScene.scene.wake();
this.currentScene.params = params;
Expand Down
97 changes: 97 additions & 0 deletions src/scenes/bootScene.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,103 @@ export default class BootScene extends Phaser.Scene {
this.load.image('living_playDoorClosed', 'livingroom/livingroomDoorClosed.png');
this.load.image('living_playDoorOpened', 'livingroom/livingroomDoorOpened.png');


// Patio
this.load.image('playgroundClosed', 'playground/playgroundClosed.png');
this.load.image('playgroundOpened', 'playground/playgroundOpened.png');
// this.load.image('earring', 'playground/earring.png');

// Escaleras
this.load.image('stairsBg', 'stairs/stairsBg.png');
this.load.image('stairsDoorClosed', 'stairs/stairsDoorClosed.png');
this.load.image('stairsDoorOpened', 'stairs/stairsDoorOpened.png');

// Pasillo
this.load.image('corridorBg', 'corridor/corridorBg.png');
// this.load.image('boysDoorClosed', 'corridor/boysDoorClosed.png');
// this.load.image('boysDoorOpened', 'corridor/boysDoorOpened.png');
// this.load.image('girlsDoorClosed', 'corridor/girlsDoorClosed.png');
// this.load.image('girlsDoorOpened', 'corridor/girlsDoorOpened.png');
// this.load.image('classDoorClosed', 'corridor/classDoorClosed.png');
// this.load.image('classDoorOpened', 'corridor/classDoorOpened.png');

// Banos
this.load.image('bathroomBg', 'bathroom/bathroomBg.png');
// this.load.image('bathroomDoorClosed', 'bathroom/bathroomDoorClosed.png');
// this.load.image('bathroomDoorOpened', 'bathroom/bathroomDoorOpened.png');
// this.load.image('bathroomStall1Closed', 'bathroom/bathroomStall1Closed.png');
// this.load.image('bathroomStall1Opened', 'bathroom/bathroomStall1Opened.png');
// this.load.image('bathroomstall2Closed', 'bathroom/bathroomstall2Closed.png');
// this.load.image('bathroomstall2Opened', 'bathroom/bathroomstall2Opened.png');
// this.load.image('stolenPhone', 'bathroom/stolenPhone.png');

// Clase desde el frente
this.load.image('classFrontBg', 'classFront/classFrontBg.png');
// this.load.image('frontChar1', 'classFront/frontChar1.png');
// this.load.image('frontChar2', 'classFront/frontChar2.png');
// this.load.image('frontChar3', 'classFront/frontChar3.png');
// this.load.image('frontChar4', 'classFront/frontChar4.png');
// this.load.image('frontChar5', 'classFront/frontChar5.png');
// this.load.image('frontChar6', 'classFront/frontChar6.png');
// this.load.image('frontChar7', 'classFront/frontChar7.png');
// this.load.image('frontChar8', 'classFront/frontChar8.png');
// this.load.image('frontChar9', 'classFront/frontChar9.png');
// this.load.image('frontChar10', 'classFront/frontChar10.png');
// this.load.image('frontChar11', 'classFront/frontChar11.png');
// this.load.image('frontChar12', 'classFront/frontChar12.png');
// this.load.image('frontChar13', 'classFront/frontChar13.png');
// this.load.image('frontChar14', 'classFront/frontChar14.png');
// this.load.image('frontChar15', 'classFront/frontChar15.png');
// this.load.image('frontRow1Chairs', 'classFront/frontRow1Chairs.png');
// this.load.image('frontRow1Tables', 'classFront/frontRow1Tables.png');
// this.load.image('frontRow2Chairs', 'classFront/frontRow2Chairs.png');
// this.load.image('frontRow2Tables', 'classFront/frontRow2Tables.png');
// this.load.image('frontRow3Chairs', 'classFront/frontRow3Chairs.png');
// this.load.image('frontRow3Tables', 'classFront/frontRow3Tables.png');
// this.load.image('frontRow4Chairs', 'classFront/frontRow4Chairs.png');
// this.load.image('frontRow4Tables', 'classFront/frontRow4Tables.png');
// this.load.image('frontRow5Chairs', 'classFront/frontRow5Chairs.png');
// this.load.image('frontRow5Tables', 'classFront/frontRow5Tables.png');

// Clase desde el fondo
this.load.image('classBackBg', 'classBack/classBackBg.png');
// this.load.image('backChar1', 'classBack/backChar1.png');
// this.load.image('backChar2', 'classBack/backChar2.png');
// this.load.image('backChar3', 'classBack/backChar3.png');
// this.load.image('backChar4', 'classBack/backChar4.png');
// this.load.image('backChar5', 'classBack/backChar5.png');
// this.load.image('backChar6', 'classBack/backChar6.png');
// this.load.image('backChar7', 'classBack/backChar7.png');
// this.load.image('backChar8', 'classBack/backChar8.png');
// this.load.image('backChar9', 'classBack/backChar9.png');
// this.load.image('backChar10', 'classBack/backChar10.png');
// this.load.image('backChar11', 'classBack/backChar11.png');
// this.load.image('backChar12', 'classBack/backChar12.png');
// this.load.image('backChar13', 'classBack/backChar13.png');
// this.load.image('backChar14', 'classBack/backChar14.png');
// this.load.image('backChar15', 'classBack/backChar15.png');
// this.load.image('backRow1Chairs', 'classBack/backRow1Chairs.png');
// this.load.image('backRow1Tables', 'classBack/backRow1Tables.png');
// this.load.image('backRow2Chairs', 'classBack/backRow2Chairs.png');
// this.load.image('backRow2Tables', 'classBack/backRow2Tables.png');
// this.load.image('backRow3Chairs', 'classBack/backRow3Chairs.png');
// this.load.image('backRow3Tables', 'classBack/backRow3Tables.png');
// this.load.image('backRow4Chairs', 'classBack/backRow4Chairs.png');
// this.load.image('backRow4Tables', 'classBack/backRow4Tables.png');
// this.load.image('backRow5Chairs', 'classBack/backRow5Chairs.png');
// this.load.image('backRow5Tables', 'classBack/backRow5Tables.png');
// this.load.image('blackboardPic1', 'classBack/blackboardPic1.png');
// this.load.image('blackboardPic2', 'classBack/blackboardPic2.png');
// this.load.image('blackboardPic3', 'classBack/blackboardPic3.png');
// this.load.image('class_corridorDoorClosed', 'classBack/classDoorClosed.png');
// this.load.image('class_corridorDoorOpened', 'classBack/classDoorOpened.png');

// Pesadillas
this.load.image('nightmaresBg', 'nightmares/nightmaresBg.png');
// this.load.image('gum', 'nightmares/gum.png');
// this.load.image('gumChair', 'nightmares/gumChair.png');
// this.load.image('nightmaresChair', 'nightmares/nightmaresChair.png');

}

preload() {
Expand Down
21 changes: 16 additions & 5 deletions src/scenes/gameLoop/baseScene.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,15 @@ export default class BaseScene extends Phaser.Scene {
// console.log(params);

this.dialogManager.changeScene(this);

// Por defecto se pone la camara en el centro y si hay parametros que indiquen
// donde colocar la camara, se coloca a la izquierda o a la derecha
this.cameras.main.scrollX = this.rightBound / 2 - this.CANVAS_WIDTH / 2;
if (params) {
if (params.left === undefined || params.left === true) {
if (params.camPos === "left") {
this.cameras.main.scrollX = this.leftBound;
}
else {
else if (params.camPos === "right") {
this.cameras.main.scrollX = this.rightBound - this.CANVAS_WIDTH;
}
}
Expand Down Expand Up @@ -492,11 +496,12 @@ export default class BaseScene extends Phaser.Scene {
* al interactuar con ella (al hacer click o al pasar/sacar el raton por encima)
* @param {Phaser.Image} closed - imagen de la puerta cerrada
* @param {Phaser.Image} opened - imagen de la puerta abierta
* @param {Function} onClick - funcion a la que se llamara al hacer click sobre la puerta abierta
* @param {Boolean} click - true si la imagen se cambia al hacer click, false si lo hace al pasar/sacar el raton por encima
*/
toggleDoor(closed, opened, click = true) {
closed.setInteractive({ useHandCursor: true });
opened.setInteractive({ useHandCursor: true });
toggleDoor(closed, opened, onClick = { }, click = true) {
closed.setInteractive({ useHandCursor: true });
opened.setInteractive({ useHandCursor: true });

opened.visible = false;
let openEvt = 'pointerdown';
Expand All @@ -515,6 +520,12 @@ export default class BaseScene extends Phaser.Scene {
opened.visible = false;
closed.visible = true;
});

opened.on('pointerdown', () => {
if (onClick !== null && typeof onClick === 'function') {
onClick();
}
})
}

}
26 changes: 26 additions & 0 deletions src/scenes/gameLoop/bathroomBase.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

import BaseScene from './baseScene.js';

export default class BathroomBase extends BaseScene {
/**
* Escena base para los banos. Coloca los elementos que se mantienen igual todos los dias
* @extends BaseScene
* @param {String} name - id de la escena
*/
constructor(name) {
super(name);
}

create(params) {
super.create(params);

this.corridor = "";

// Pone la imagen de fondo con las dimensiones del canvas
let bg = this.add.image(0, 0, 'bathroomBg').setOrigin(0, 0);
this.scale = this.CANVAS_HEIGHT / bg.height;
bg.setScale(this.scale);

this.rightBound = bg.displayWidth;
}
}
45 changes: 16 additions & 29 deletions src/scenes/gameLoop/bedroomBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,14 @@ import BaseScene from './baseScene.js';

export default class BedroomBase extends BaseScene {
/**
* Escena base para la habitacion. Coloca los elementos comunes a
* la habitacion de todos los dias (cama, puerta, mesa, armarios...)
* Escena base para la habitacion. Coloca los elementos que se mantienen igual todos los dias
* @extends BaseScene
* @param {String} name - id de la escena
*/
constructor(name) {
super(name);
}

// Metodo que se llama al terminar de crear la escena.
onCreate(params) {
super.onCreate(params);

this.phoneManager.topLid.visible = false;
this.phoneManager.botLid.visible = false;
}


create(params) {
super.create(params);

Expand Down Expand Up @@ -59,7 +50,7 @@ export default class BedroomBase extends BaseScene {
door1Closed.setDepth(bg.depth + 3);
door1Opened.setDepth(door1Closed.depth - 1);
wardrobe1.setDepth(door1Opened.depth - 1);
wardrobe1.setInteractive({ useHandCursor: true });
wardrobe1.setInteractive({ useHandCursor: true });
wardrobe1.on('pointerdown', () => {
if (door1Opened.visible) {
this.dialogManager.setNode(this.wardrobe1Node)
Expand All @@ -72,7 +63,7 @@ export default class BedroomBase extends BaseScene {
door3Closed.setDepth(bg.depth + 3);
door3Opened.setDepth(door2Closed.depth - 1);
wardrobe2.setDepth(door2Opened.depth - 1);
wardrobe2.setInteractive({ useHandCursor: true });
wardrobe2.setInteractive({ useHandCursor: true });
wardrobe2.on('pointerdown', () => {
if (door2Opened.visible || door3Opened.visible) {
this.dialogManager.setNode(this.wardrobe2Node)
Expand All @@ -81,12 +72,11 @@ export default class BedroomBase extends BaseScene {


// Ordenador
// Al hacer click sobre el, se cambia el nodo en el dialogManager, y si
// se lanza el evento turnPC, se cambia a la escena del ordenador
this.pcNode = null;

let pc = this.add.rectangle(276, 360, 150, 162, 0xfff, 0).setOrigin(0, 0);
pc.setInteractive({ useHandCursor: true });
pc.setInteractive({ useHandCursor: true });
// Al hacer click sobre el, se cambia el nodo en el dialogManager, y si
// se lanza el evento turnPC, se cambia a la escena del ordenador
pc.on('pointerdown', () => {
this.dialogManager.setNode(this.pcNode);
});
Expand All @@ -100,27 +90,24 @@ export default class BedroomBase extends BaseScene {
// Puerta de la habitacion
let doorClosed = this.add.image(6, this.CANVAS_HEIGHT, 'bed_livingDoorClosed').setOrigin(0, 1).setScale(this.scale);
let doorOpened = this.add.image(6, this.CANVAS_HEIGHT, 'bed_livingDoorOpened').setOrigin(0, 1).setScale(this.scale);
super.toggleDoor(doorClosed, doorOpened, false);

// Al hacer click sobre la puerta abierta, se
// pasa al salon con la camara en la derecha
doorOpened.on('pointerdown', () => {
// Al hacer click sobre la puerta abierta, se pasa al salon con la camara en la derecha
super.toggleDoor(doorClosed, doorOpened, () => {
let params = {
left: false
camPos: "right"
};
this.gameManager.changeScene(this.livingroom, params, true);
});

}, false);


// Cama
// Al igual que con el interior de los armarios, se recoloca su profundidad y al
// hacer click sobre ella, se cambia el nodo en el dialogManager
// Al igual que con el interior de los armarios, se recoloca su profundidad
// y al hacer click sobre ella, se cambia el nodo en el dialogManager
this.bed = this.add.image(bg.displayWidth, this.CANVAS_HEIGHT, 'bed').setOrigin(1, 1).setScale(this.scale);
this.bed.setInteractive({ useHandCursor: true });
this.bed.setInteractive({ useHandCursor: true });
this.bed.setDepth(10);
this.bedNode = null;
this.bed.on('pointerdown', () => {
this.dialogManager.setNode(this.bedNode)
this.dialogManager.setNode(this.bedNode);
})


Expand Down
Loading

0 comments on commit 26c7c38

Please sign in to comment.