From 07a41315f736b53bab4f90df35030a558fe189b7 Mon Sep 17 00:00:00 2001 From: ChrisCPI <92183829+ChrisCPI@users.noreply.github.com> Date: Mon, 7 Oct 2024 20:02:44 -0400 Subject: [PATCH 01/15] Add ClockTower widget --- src/data/widgets.js | 1 + .../interface/game/clock_tower/ClockTower.js | 68 ++++++++++ .../game/clock_tower/ClockTower.scene | 121 ++++++++++++++++++ src/scenes/rooms/forts/Forts.js | 5 + src/scenes/rooms/forts/Forts.scene | 1 + 5 files changed, 196 insertions(+) create mode 100644 src/scenes/interface/game/clock_tower/ClockTower.js create mode 100644 src/scenes/interface/game/clock_tower/ClockTower.scene diff --git a/src/data/widgets.js b/src/data/widgets.js index b3658bc1..0af87950 100644 --- a/src/data/widgets.js +++ b/src/data/widgets.js @@ -7,6 +7,7 @@ const widgets = { 'PetsCatalog': require('@scenes/interface/catalogs/pets/PetsCatalog'), 'AgentQuiz': require('@scenes/interface/quiz/agent/AgentQuiz'), + 'ClockTower': require('@scenes/interface/game/clock_tower/ClockTower'), 'FindFour': require('@scenes/games/four/FindFour'), 'Mancala': require('@scenes/games/mancala/Mancala'), 'Map': require('@scenes/interface/game/map/Map'), diff --git a/src/scenes/interface/game/clock_tower/ClockTower.js b/src/scenes/interface/game/clock_tower/ClockTower.js new file mode 100644 index 00000000..f8a298d0 --- /dev/null +++ b/src/scenes/interface/game/clock_tower/ClockTower.js @@ -0,0 +1,68 @@ +/* START OF COMPILED CODE */ + +import BaseContainer from "../../../base/BaseContainer"; +import Interactive from "../../../components/Interactive"; +import Button from "../../../components/Button"; +/* START-USER-IMPORTS */ +/* END-USER-IMPORTS */ + +export default class ClockTower extends BaseContainer { + + constructor(scene, x, y) { + super(scene, x ?? 760, y ?? 480); + + // block + const block = scene.add.rectangle(0, 0, 1520, 960); + block.isFilled = true; + block.fillColor = 0; + block.fillAlpha = 0.2; + this.add(block); + + // bg + const bg = scene.add.ninePatchContainer(0, -38, 685, 560, "prompt", "window"); + bg.marginLeft = 50; + bg.marginTop = 50; + bg.marginRight = 50; + bg.marginBottom = 50; + this.add(bg); + + // title + const title = scene.add.text(0, -238, "", {}); + title.setOrigin(0.5, 0.5); + title.text = "CLUB PENGUIN\nCLOCK TOWER"; + title.setStyle({ "align": "center", "fixedWidth":600,"fontFamily": "CCFaceFront", "fontSize": "40px", "fontStyle": "bold italic", "stroke": "#003366", "strokeThickness":10}); + this.add(title); + + // text + const text = scene.add.text(0, -5, "", {}); + text.setOrigin(0.5, 0.5); + text.text = "The time showing on this clock may not match\nthe time on your computer. This snowball-\npowered clock, like all other clocks in Club\nPenguin, is in PST (Penguin Standard Time).\n\nThis means that penguins from all over the world\nwill see this clock as the exact same time, even if\nthe penguins are in different time zones.\nBecause of this, you can use this clock to plan\nparties and fun events with friends."; + text.setStyle({ "align": "center", "color": "#000000ff", "fixedWidth":600,"fontFamily": "Arial Narrow", "fontSize": "32px" }); + text.setLineSpacing(1); + this.add(text); + + // x_button + const x_button = scene.add.image(293, -269, "main", "blue-button"); + this.add(x_button); + + // blue_x + const blue_x = scene.add.image(293, -271, "main", "blue-x"); + this.add(blue_x); + + // block (components) + new Interactive(block); + + // x_button (components) + const x_buttonButton = new Button(x_button); + x_buttonButton.spriteName = "blue-button"; + x_buttonButton.callback = () => this.close(); + + /* START-USER-CTR-CODE */ + /* END-USER-CTR-CODE */ + } + + /* START-USER-CODE */ + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ \ No newline at end of file diff --git a/src/scenes/interface/game/clock_tower/ClockTower.scene b/src/scenes/interface/game/clock_tower/ClockTower.scene new file mode 100644 index 00000000..00ef8386 --- /dev/null +++ b/src/scenes/interface/game/clock_tower/ClockTower.scene @@ -0,0 +1,121 @@ +{ + "id": "eadf4705-86c5-44cc-bbb0-334f5c22e3a4", + "sceneType": "PREFAB", + "settings": { + "compilerInsertSpaces": true, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "autoImport": true, + "superClassName": "BaseContainer", + "preloadMethodName": "", + "preloadPackFiles": [], + "createMethodName": "", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Container", + "id": "7ccede66-2c72-4b2d-aa98-6b7ddebbcc6d", + "label": "container_1", + "x": 760, + "y": 480, + "list": [ + { + "type": "Rectangle", + "id": "3f447312-ee70-467c-9ccc-50135a68b49c", + "label": "block", + "components": [ + "Interactive" + ], + "isFilled": true, + "fillColor": "#000000", + "fillAlpha": 0.2, + "width": 1520, + "height": 960 + }, + { + "type": "NinePatchContainer", + "id": "75361d4d-e115-43d6-9bca-d2b2f23aca3e", + "label": "bg", + "texture": { + "key": "prompt", + "frame": "window" + }, + "y": -38, + "width": 685, + "height": 560, + "marginLeft": 50, + "marginRight": 50, + "marginTop": 50, + "marginBottom": 50 + }, + { + "type": "Text", + "id": "2d93b594-89c7-4dc5-91bb-3e8ea45edd7c", + "label": "title", + "y": -238, + "originX": 0.5, + "originY": 0.5, + "text": "CLUB PENGUIN\nCLOCK TOWER", + "fixedWidth": 600, + "align": "center", + "fontFamily": "CCFaceFront", + "fontSize": "40px", + "fontStyle": "bold italic", + "stroke": "#003366", + "strokeThickness": 10 + }, + { + "type": "Text", + "id": "37cefc98-0e14-4772-82a1-d5c11efc42d6", + "label": "text", + "y": -5, + "originX": 0.5, + "originY": 0.5, + "text": "The time showing on this clock may not match\nthe time on your computer. This snowball-\npowered clock, like all other clocks in Club\nPenguin, is in PST (Penguin Standard Time).\n\nThis means that penguins from all over the world\nwill see this clock as the exact same time, even if\nthe penguins are in different time zones.\nBecause of this, you can use this clock to plan\nparties and fun events with friends.", + "fixedWidth": 600, + "lineSpacing": 1, + "align": "center", + "fontFamily": "Arial Narrow", + "fontSize": "32px", + "color": "#000000ff" + }, + { + "type": "Image", + "id": "74d3e62f-891d-4503-a6fe-3c959ba1a674", + "label": "x_button", + "components": [ + "Button" + ], + "Button.spriteName": "blue-button", + "Button.callback": "() => this.close()", + "texture": { + "key": "main", + "frame": "blue-button" + }, + "x": 293, + "y": -269 + }, + { + "type": "Image", + "id": "28586f60-7efc-424f-ab91-f02c7815475d", + "label": "blue_x", + "texture": { + "key": "main", + "frame": "blue-x" + }, + "x": 293, + "y": -271 + } + ] + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 4 + } +} \ No newline at end of file diff --git a/src/scenes/rooms/forts/Forts.js b/src/scenes/rooms/forts/Forts.js index a1ee0202..177a0ff5 100644 --- a/src/scenes/rooms/forts/Forts.js +++ b/src/scenes/rooms/forts/Forts.js @@ -148,6 +148,7 @@ export default class Forts extends RoomScene { // sign (components) const signButton = new Button(sign); signButton.spriteName = "sign"; + signButton.callback = () => this.onPlaqueClick(); signButton.activeFrame = false; // blue_flag (components) @@ -217,6 +218,10 @@ export default class Forts extends RoomScene { this.dayText.text = now.toLocaleDateString('en-US', {weekday: 'long' }).toUpperCase() } + onPlaqueClick() { + this.interface.loadWidget('ClockTower') + } + /* END-USER-CODE */ } diff --git a/src/scenes/rooms/forts/Forts.scene b/src/scenes/rooms/forts/Forts.scene index 36c419ad..aa8d9e70 100644 --- a/src/scenes/rooms/forts/Forts.scene +++ b/src/scenes/rooms/forts/Forts.scene @@ -159,6 +159,7 @@ "Button" ], "Button.spriteName": "sign", + "Button.callback": "() => this.onPlaqueClick()", "Button.activeFrame": false, "texture": { "key": "forts", From 28dc6cd103d1285fa1dfecd607e3ee9e6c3f6ebc Mon Sep 17 00:00:00 2001 From: ChrisCPI <92183829+ChrisCPI@users.noreply.github.com> Date: Tue, 8 Oct 2024 14:35:45 -0400 Subject: [PATCH 02/15] Add MancalaHelp --- assets/styles/fonts.css | 7 + src/data/fonts.js | 2 +- src/data/widgets.js | 1 + src/scenes/interface/books/BookContainer.js | 6 +- .../instructions/mancala/MancalaHelp.js | 339 ++++++++++ .../instructions/mancala/MancalaHelp.scene | 582 ++++++++++++++++++ src/scenes/rooms/book/Book.js | 6 + src/scenes/rooms/book/Book.scene | 32 +- 8 files changed, 947 insertions(+), 28 deletions(-) create mode 100644 src/scenes/interface/instructions/mancala/MancalaHelp.js create mode 100644 src/scenes/interface/instructions/mancala/MancalaHelp.scene diff --git a/assets/styles/fonts.css b/assets/styles/fonts.css index 23cb2c12..982c5ba0 100644 --- a/assets/styles/fonts.css +++ b/assets/styles/fonts.css @@ -53,6 +53,13 @@ src: url('../fonts/CCComicrazy_Bold.woff2'); } +@font-face { + font-family: 'CCComiccrazy'; + font-style: italic; + font-weight: normal; + src: url('../fonts/CCComicrazy_Italic.woff2'); +} + @font-face { font-family: 'CCFaceFront'; src: url('../fonts/CCFaceFront.woff2'); diff --git a/src/data/fonts.js b/src/data/fonts.js index aa15f5be..2be5cf8b 100644 --- a/src/data/fonts.js +++ b/src/data/fonts.js @@ -6,7 +6,7 @@ const fonts = { 'Asterisk:n4', 'Burbank Big Regular:n7', 'Burbank Small:n4,n7', - 'CCComiccrazy:n4,n7', + 'CCComiccrazy:n4,n7,i7', 'CCFaceFront:n4,i7', 'CPLCD:n4' ], diff --git a/src/data/widgets.js b/src/data/widgets.js index 0af87950..c9b03f01 100644 --- a/src/data/widgets.js +++ b/src/data/widgets.js @@ -10,6 +10,7 @@ const widgets = { 'ClockTower': require('@scenes/interface/game/clock_tower/ClockTower'), 'FindFour': require('@scenes/games/four/FindFour'), 'Mancala': require('@scenes/games/mancala/Mancala'), + 'MancalaHelp': require('@scenes/interface/instructions/mancala/MancalaHelp'), 'Map': require('@scenes/interface/game/map/Map'), 'Missions': require('@scenes/interface/game/missions/Missions'), 'NinjaBelts': require('@scenes/interface/instructions/ninjabelts/NinjaBelts'), diff --git a/src/scenes/interface/books/BookContainer.js b/src/scenes/interface/books/BookContainer.js index ed667240..5cfa4487 100644 --- a/src/scenes/interface/books/BookContainer.js +++ b/src/scenes/interface/books/BookContainer.js @@ -3,8 +3,8 @@ import BaseContainer from '@scenes/base/BaseContainer' export default class BookContainer extends BaseContainer { - constructor(key) { - super(key) + constructor(scene, x, y) { + super(scene, x, y) // Current page number this.page = 0 @@ -64,6 +64,8 @@ export default class BookContainer extends BaseContainer { } setButtonsVisible() { + if (!this.buttons) return + // Not visible on first and last page let visible = this.page > 0 && this.page < this.pages.length - 1 diff --git a/src/scenes/interface/instructions/mancala/MancalaHelp.js b/src/scenes/interface/instructions/mancala/MancalaHelp.js new file mode 100644 index 00000000..ca0e8e42 --- /dev/null +++ b/src/scenes/interface/instructions/mancala/MancalaHelp.js @@ -0,0 +1,339 @@ +export const preload = { + key: 'mancala_help-pack', + url: 'assets/media/interface/instructions/mancala/mancala_help-pack.json', + loadString: ['loading', 'mancala_help'] +} + +/* START OF COMPILED CODE */ + +import BookContainer from "../../books/BookContainer"; +import Interactive from "../../../components/Interactive"; +import Button from "../../../components/Button"; +/* START-USER-IMPORTS */ +/* END-USER-IMPORTS */ + +export default class MancalaHelp extends BookContainer { + + constructor(scene, x, y) { + super(scene, x ?? 760, y ?? 480); + + /** @type {Phaser.GameObjects.Text} */ + this.pageText; + /** @type {Phaser.GameObjects.Image[]} */ + this.indicators; + /** @type {Phaser.GameObjects.Container[]} */ + this.pages; + + + // block + const block = scene.add.rectangle(0, 0, 1520, 960); + block.isFilled = true; + block.fillColor = 0; + block.fillAlpha = 0.2; + this.add(block); + + // bg + const bg = scene.add.ninePatchContainer(0, 0, 1136, 664, "prompt", "window"); + bg.marginLeft = 50; + bg.marginTop = 50; + bg.marginRight = 50; + bg.marginBottom = 50; + this.add(bg); + + // title + const title = scene.add.text(0, -238, "", {}); + title.setOrigin(0.5, 0.5); + title.text = "HOW TO PLAY MANCALA"; + title.setStyle({ "align": "center", "fixedWidth":600,"fontFamily": "CCComiccrazy", "fontSize": "40px", "fontStyle": "italic", "stroke": "#014066", "strokeThickness":10}); + this.add(title); + + // page1 + const page1 = scene.add.container(0, 0); + this.add(page1); + + // page1_text1 + const page1_text1 = scene.add.text(0, -147, "", {}); + page1_text1.setOrigin(0.5, 0.5); + page1_text1.text = "OBJECT OF THE GAME"; + page1_text1.setStyle({ "align": "center", "color": "#000000", "fixedWidth":600,"fontFamily": "CCComiccrazy", "fontSize": "40px", "fontStyle": "italic" }); + page1.add(page1_text1); + + // page1_text2 + const page1_text2 = scene.add.text(0, -70, "", {}); + page1_text2.setOrigin(0.5, 0.5); + page1_text2.text = "Each player attempts to collect as many stones as\npossible before one of the players\nclears his or her side of stones."; + page1_text2.setStyle({ "align": "center", "color": "#000000", "fixedWidth":750,"fontFamily": "Arial", "fontSize": "32px" }); + page1.add(page1_text2); + + // page1_text3 + const page1_text3 = scene.add.text(0, 19, "", {}); + page1_text3.setOrigin(0.5, 0.5); + page1_text3.text = "THE BOARD"; + page1_text3.setStyle({ "align": "center", "color": "#000000", "fixedWidth":600,"fontFamily": "CCComiccrazy", "fontSize": "40px", "fontStyle": "italic" }); + page1.add(page1_text3); + + // page1_text4 + const page1_text4 = scene.add.text(0, 113, "", {}); + page1_text4.setOrigin(0.5, 0.5); + page1_text4.text = "Each player has a side of the board. (top and\nbottom) The six holes nearest each player belong\nto him or her and their large holes or\nmancala is to the right."; + page1_text4.setStyle({ "align": "center", "color": "#000000", "fixedWidth":750,"fontFamily": "Arial", "fontSize": "32px" }); + page1.add(page1_text4); + + // page2 + const page2 = scene.add.container(0, 0); + page2.visible = false; + this.add(page2); + + // board + const board = scene.add.image(0, 38, "mancala_help", "board"); + page2.add(board); + + // page2_text1 + const page2_text1 = scene.add.text(0, -132, "", {}); + page2_text1.setOrigin(0.5, 0.5); + page2_text1.text = "THE BOARD"; + page2_text1.setStyle({ "align": "center", "color": "#000000", "fixedWidth":600,"fontFamily": "CCComiccrazy", "fontSize": "40px", "fontStyle": "italic" }); + page2.add(page2_text1); + + // page2_text2 + const page2_text2 = scene.add.text(-35, -78, "", {}); + page2_text2.setOrigin(0.5, 0.5); + page2_text2.text = "Player 2 Side"; + page2_text2.setStyle({ "align": "center", "color": "#000000", "fixedWidth":200,"fontFamily": "Arial", "fontSize": "32px" }); + page2.add(page2_text2); + + // page2_text3 + const page2_text3 = scene.add.text(38, 142, "", {}); + page2_text3.setOrigin(0.5, 0.5); + page2_text3.text = "Player 1 Side"; + page2_text3.setStyle({ "align": "center", "color": "#000000", "fixedWidth":200,"fontFamily": "Arial", "fontSize": "32px" }); + page2.add(page2_text3); + + // page2_text4 + const page2_text4 = scene.add.text(-335, 27, "", {}); + page2_text4.setOrigin(0.5, 0.5); + page2_text4.text = "Player 2\nMancala"; + page2_text4.setStyle({ "align": "right", "color": "#000000", "fixedWidth":150,"fontFamily": "Arial", "fontSize": "24px" }); + page2.add(page2_text4); + + // page2_text5 + const page2_text5 = scene.add.text(336, 27, "", {}); + page2_text5.setOrigin(0.5, 0.5); + page2_text5.text = "Player 1\nMancala"; + page2_text5.setStyle({ "color": "#000000", "fixedWidth":150,"fontFamily": "Arial", "fontSize": "24px" }); + page2.add(page2_text5); + + // page3 + const page3 = scene.add.container(0, 0); + page3.visible = false; + this.add(page3); + + // page3_text1 + const page3_text1 = scene.add.text(0, -93, "", {}); + page3_text1.setOrigin(0.5, 0.5); + page3_text1.text = "HOW TO PLAY"; + page3_text1.setStyle({ "align": "center", "color": "#000000", "fixedWidth":600,"fontFamily": "CCComiccrazy", "fontSize": "40px", "fontStyle": "italic" }); + page3.add(page3_text1); + + // page3_text2 + const page3_text2 = scene.add.text(0, 27, "", {}); + page3_text2.setOrigin(0.5, 0.5); + page3_text2.text = "Players alternate turns. In his or her turn each\nplayer selects a group of stones from one hole on\nhis or her side of the board. Each stone is dropped\none by one in the holes around the board, including\nhis mancala but not the opponents mancala."; + page3_text2.setStyle({ "align": "center", "color": "#000000", "fixedWidth":750,"fontFamily": "Arial", "fontSize": "32px" }); + page3.add(page3_text2); + + // page4 + const page4 = scene.add.container(0, 0); + page4.visible = false; + this.add(page4); + + // page4_text1 + const page4_text1 = scene.add.text(0, -149, "", {}); + page4_text1.setOrigin(0.5, 0.5); + page4_text1.text = "FREE TURNS"; + page4_text1.setStyle({ "align": "center", "color": "#000000", "fixedWidth":600,"fontFamily": "CCComiccrazy", "fontSize": "40px", "fontStyle": "italic" }); + page4.add(page4_text1); + + // page4_text2 + const page4_text2 = scene.add.text(0, -88, "", {}); + page4_text2.setOrigin(0.5, 0.5); + page4_text2.text = "If the last stone lands in the players own mancala,\nthat player goes again."; + page4_text2.setStyle({ "align": "center", "color": "#000000", "fixedWidth":750,"fontFamily": "Arial", "fontSize": "32px" }); + page4.add(page4_text2); + + // page4_text3 + const page4_text3 = scene.add.text(0, -4, "", {}); + page4_text3.setOrigin(0.5, 0.5); + page4_text3.text = "CAPTURES"; + page4_text3.setStyle({ "align": "center", "color": "#000000", "fixedWidth":600,"fontFamily": "CCComiccrazy", "fontSize": "40px", "fontStyle": "italic" }); + page4.add(page4_text3); + + // page4_text4 + const page4_text4 = scene.add.text(0, 92, "", {}); + page4_text4.setOrigin(0.5, 0.5); + page4_text4.text = "If the last stone is dropped in an empty hole on the\nplayers own side, he captures all the stones from\nthe opponents hole directly opposite that hole,\nincluding his stone."; + page4_text4.setStyle({ "align": "center", "color": "#000000", "fixedWidth":750,"fontFamily": "Arial", "fontSize": "32px" }); + page4.add(page4_text4); + + // page5 + const page5 = scene.add.container(0, 0); + page5.visible = false; + this.add(page5); + + // page5_text1 + const page5_text1 = scene.add.text(0, -93, "", {}); + page5_text1.setOrigin(0.5, 0.5); + page5_text1.text = "HOW TO WIN"; + page5_text1.setStyle({ "align": "center", "color": "#000000", "fixedWidth":600,"fontFamily": "CCComiccrazy", "fontSize": "40px", "fontStyle": "italic" }); + page5.add(page5_text1); + + // page5_text2 + const page5_text2 = scene.add.text(0, 26, "", {}); + page5_text2.setOrigin(0.5, 0.5); + page5_text2.text = "The game is over when a player has no more\nstones on his side of the board. The winner is the\nplayer with the greatest total of stones in his or her\nmancala and any remaining stones on his or her\nside of the board."; + page5_text2.setStyle({ "align": "center", "color": "#000000", "fixedWidth":750,"fontFamily": "Arial", "fontSize": "32px" }); + page5.add(page5_text2); + + // tab1 + const tab1 = scene.add.image(36, 270, "mancala_help", "tab"); + this.add(tab1); + + // tab2 + const tab2 = scene.add.image(76, 270, "mancala_help", "tab"); + tab2.alpha = 0.2; + tab2.alphaTopLeft = 0.2; + tab2.alphaTopRight = 0.2; + tab2.alphaBottomLeft = 0.2; + tab2.alphaBottomRight = 0.2; + this.add(tab2); + + // tab3 + const tab3 = scene.add.image(116, 270, "mancala_help", "tab"); + tab3.alpha = 0.2; + tab3.alphaTopLeft = 0.2; + tab3.alphaTopRight = 0.2; + tab3.alphaBottomLeft = 0.2; + tab3.alphaBottomRight = 0.2; + this.add(tab3); + + // tab4 + const tab4 = scene.add.image(156, 270, "mancala_help", "tab"); + tab4.alpha = 0.2; + tab4.alphaTopLeft = 0.2; + tab4.alphaTopRight = 0.2; + tab4.alphaBottomLeft = 0.2; + tab4.alphaBottomRight = 0.2; + this.add(tab4); + + // tab5 + const tab5 = scene.add.image(196, 270, "mancala_help", "tab"); + tab5.alpha = 0.2; + tab5.alphaTopLeft = 0.2; + tab5.alphaTopRight = 0.2; + tab5.alphaBottomLeft = 0.2; + tab5.alphaBottomRight = 0.2; + this.add(tab5); + + // pageText + const pageText = scene.add.text(310, 269, "", {}); + pageText.setOrigin(0.5, 0.5); + pageText.alpha = 0.5; + pageText.alphaTopLeft = 0.5; + pageText.alphaTopRight = 0.5; + pageText.alphaBottomLeft = 0.5; + pageText.alphaBottomRight = 0.5; + pageText.text = "Page 1 of 5"; + pageText.setStyle({ "align": "center", "color": "#ffffff", "fixedWidth":150,"fontFamily": "Arial Narrow", "fontSize": "32px" }); + pageText.setLineSpacing(1); + this.add(pageText); + + // right_button + const right_button = scene.add.image(512, 269, "main", "blue-button"); + this.add(right_button); + + // right_arrow + const right_arrow = scene.add.image(512, 267, "main", "blue-arrow"); + right_arrow.angle = 90; + right_arrow.flipX = true; + this.add(right_arrow); + + // left_button + const left_button = scene.add.image(452, 269, "main", "blue-button"); + this.add(left_button); + + // left_arrow + const left_arrow = scene.add.image(452, 267, "main", "blue-arrow"); + left_arrow.angle = 90; + left_arrow.flipX = true; + left_arrow.flipY = true; + this.add(left_arrow); + + // x_button + const x_button = scene.add.image(510, -274, "main", "blue-button"); + this.add(x_button); + + // blue_x + const blue_x = scene.add.image(510, -276, "main", "blue-x"); + this.add(blue_x); + + // lists + const indicators = [tab1, tab2, tab3, tab4, tab5]; + const pages = [page1, page2, page3, page4, page5]; + + // block (components) + new Interactive(block); + + // right_button (components) + const right_buttonButton = new Button(right_button); + right_buttonButton.spriteName = "blue-button"; + right_buttonButton.callback = () => this.nextPage(); + + // left_button (components) + const left_buttonButton = new Button(left_button); + left_buttonButton.spriteName = "blue-button"; + left_buttonButton.callback = () => this.prevPage(); + + // x_button (components) + const x_buttonButton = new Button(x_button); + x_buttonButton.spriteName = "blue-button"; + x_buttonButton.callback = () => this.close(); + + this.pageText = pageText; + this.indicators = indicators; + this.pages = pages; + + /* START-USER-CTR-CODE */ + /* END-USER-CTR-CODE */ + } + + + /* START-USER-CODE */ + + nextPage() { + if (this.page < this.pages.length - 1) { + this.indicators[this.page + 1].alpha = 1 + } + + super.nextPage() + + this.setPageText() + } + + prevPage() { + if (this.page > 0) { + this.indicators[this.page].alpha = 0.2 + } + + super.prevPage() + + this.setPageText() + } + + setPageText() { + this.pageText.text = `Page ${this.page + 1} of ${this.pages.length}` + } + + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ \ No newline at end of file diff --git a/src/scenes/interface/instructions/mancala/MancalaHelp.scene b/src/scenes/interface/instructions/mancala/MancalaHelp.scene new file mode 100644 index 00000000..08683a3b --- /dev/null +++ b/src/scenes/interface/instructions/mancala/MancalaHelp.scene @@ -0,0 +1,582 @@ +{ + "id": "b6d70a42-fc0b-488a-a246-0b7d45e0b440", + "sceneType": "PREFAB", + "settings": { + "compilerInsertSpaces": true, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "autoImport": true, + "superClassName": "BookContainer", + "preloadMethodName": "", + "preloadPackFiles": [], + "createMethodName": "", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Container", + "id": "7ccede66-2c72-4b2d-aa98-6b7ddebbcc6d", + "label": "container_1", + "x": 760, + "y": 480, + "list": [ + { + "type": "Rectangle", + "id": "3f447312-ee70-467c-9ccc-50135a68b49c", + "label": "block", + "components": [ + "Interactive" + ], + "isFilled": true, + "fillColor": "#000000", + "fillAlpha": 0.2, + "width": 1520, + "height": 960 + }, + { + "type": "NinePatchContainer", + "id": "75361d4d-e115-43d6-9bca-d2b2f23aca3e", + "label": "bg", + "texture": { + "key": "prompt", + "frame": "window" + }, + "width": 1136, + "height": 664, + "marginLeft": 50, + "marginRight": 50, + "marginTop": 50, + "marginBottom": 50 + }, + { + "type": "Text", + "id": "2d93b594-89c7-4dc5-91bb-3e8ea45edd7c", + "label": "title", + "y": -238, + "originX": 0.5, + "originY": 0.5, + "text": "HOW TO PLAY MANCALA", + "fixedWidth": 600, + "align": "center", + "fontFamily": "CCComiccrazy", + "fontSize": "40px", + "fontStyle": "italic", + "stroke": "#014066", + "strokeThickness": 10 + }, + { + "type": "Container", + "id": "ba97d037-8cd5-4063-b3aa-a5e36a1cfeea", + "label": "page1", + "list": [ + { + "type": "Text", + "id": "55def667-8963-40e1-ac3f-16381c7c8223", + "label": "page1_text1", + "y": -147, + "originX": 0.5, + "originY": 0.5, + "text": "OBJECT OF THE GAME", + "fixedWidth": 600, + "align": "center", + "fontFamily": "CCComiccrazy", + "fontSize": "40px", + "fontStyle": "italic", + "color": "#000000" + }, + { + "type": "Text", + "id": "8e5b6148-6c72-4511-a4cc-17ae2770edb0", + "label": "page1_text2", + "y": -70, + "originX": 0.5, + "originY": 0.5, + "text": "Each player attempts to collect as many stones as\npossible before one of the players\nclears his or her side of stones.", + "fixedWidth": 750, + "align": "center", + "fontFamily": "Arial", + "fontSize": "32px", + "color": "#000000" + }, + { + "type": "Text", + "id": "3c30ef8d-5c4c-4443-b197-78632b186248", + "label": "page1_text3", + "y": 19, + "originX": 0.5, + "originY": 0.5, + "text": "THE BOARD", + "fixedWidth": 600, + "align": "center", + "fontFamily": "CCComiccrazy", + "fontSize": "40px", + "fontStyle": "italic", + "color": "#000000" + }, + { + "type": "Text", + "id": "4e58ae77-be30-4ca2-a602-6e7920126ede", + "label": "page1_text4", + "y": 113, + "originX": 0.5, + "originY": 0.5, + "text": "Each player has a side of the board. (top and\nbottom) The six holes nearest each player belong\nto him or her and their large holes or\nmancala is to the right.", + "fixedWidth": 750, + "align": "center", + "fontFamily": "Arial", + "fontSize": "32px", + "color": "#000000" + } + ] + }, + { + "type": "Container", + "id": "6fe37283-25fd-4aef-80c4-7293818d7c05", + "label": "page2", + "visible": false, + "list": [ + { + "type": "Image", + "id": "16350a02-6285-47a2-ab20-c2f0876d426c", + "label": "board", + "texture": { + "key": "mancala_help", + "frame": "board" + }, + "y": 38 + }, + { + "type": "Text", + "id": "bf7f91ac-c761-439b-8f62-b0e542100026", + "label": "page2_text1", + "y": -132, + "originX": 0.5, + "originY": 0.5, + "text": "THE BOARD", + "fixedWidth": 600, + "align": "center", + "fontFamily": "CCComiccrazy", + "fontSize": "40px", + "fontStyle": "italic", + "color": "#000000" + }, + { + "type": "Text", + "id": "53d463c9-d971-4296-b1ff-3791a815cc24", + "label": "page2_text2", + "x": -35, + "y": -78, + "originX": 0.5, + "originY": 0.5, + "text": "Player 2 Side", + "fixedWidth": 200, + "align": "center", + "fontFamily": "Arial", + "fontSize": "32px", + "color": "#000000" + }, + { + "type": "Text", + "id": "89eebc39-0a66-4bdb-99b6-c613d2939698", + "label": "page2_text3", + "x": 38, + "y": 142, + "originX": 0.5, + "originY": 0.5, + "text": "Player 1 Side", + "fixedWidth": 200, + "align": "center", + "fontFamily": "Arial", + "fontSize": "32px", + "color": "#000000" + }, + { + "type": "Text", + "id": "fc4f5057-70d4-4b22-9989-107efb576fed", + "label": "page2_text4", + "x": -335, + "y": 27, + "originX": 0.5, + "originY": 0.5, + "text": "Player 2\nMancala", + "fixedWidth": 150, + "align": "right", + "fontFamily": "Arial", + "fontSize": "24px", + "color": "#000000" + }, + { + "type": "Text", + "id": "fc7479ee-792e-47e8-8e49-da07429c3ece", + "label": "page2_text5", + "x": 336, + "y": 27, + "originX": 0.5, + "originY": 0.5, + "text": "Player 1\nMancala", + "fixedWidth": 150, + "fontFamily": "Arial", + "fontSize": "24px", + "color": "#000000" + } + ] + }, + { + "type": "Container", + "id": "28880a25-3dee-45bb-9054-52d559c267b7", + "label": "page3", + "visible": false, + "list": [ + { + "type": "Text", + "id": "75d188af-3705-4fde-8e97-4360b4febd5d", + "label": "page3_text1", + "y": -93, + "originX": 0.5, + "originY": 0.5, + "text": "HOW TO PLAY", + "fixedWidth": 600, + "align": "center", + "fontFamily": "CCComiccrazy", + "fontSize": "40px", + "fontStyle": "italic", + "color": "#000000" + }, + { + "type": "Text", + "id": "a6ae73f8-ed7c-4073-afcb-6b09ac5124f8", + "label": "page3_text2", + "y": 27, + "originX": 0.5, + "originY": 0.5, + "text": "Players alternate turns. In his or her turn each\nplayer selects a group of stones from one hole on\nhis or her side of the board. Each stone is dropped\none by one in the holes around the board, including\nhis mancala but not the opponents mancala.", + "fixedWidth": 750, + "align": "center", + "fontFamily": "Arial", + "fontSize": "32px", + "color": "#000000" + } + ] + }, + { + "type": "Container", + "id": "b968c1e5-b899-4353-a6a6-cacd59246317", + "label": "page4", + "visible": false, + "list": [ + { + "type": "Text", + "id": "e221f402-d448-4bff-b2cd-8fc2da6fdfa6", + "label": "page4_text1", + "y": -149, + "originX": 0.5, + "originY": 0.5, + "text": "FREE TURNS", + "fixedWidth": 600, + "align": "center", + "fontFamily": "CCComiccrazy", + "fontSize": "40px", + "fontStyle": "italic", + "color": "#000000" + }, + { + "type": "Text", + "id": "fd24918e-76aa-41d0-b9c3-351527b24d60", + "label": "page4_text2", + "y": -88, + "originX": 0.5, + "originY": 0.5, + "text": "If the last stone lands in the players own mancala,\nthat player goes again.", + "fixedWidth": 750, + "align": "center", + "fontFamily": "Arial", + "fontSize": "32px", + "color": "#000000" + }, + { + "type": "Text", + "id": "0ceef9bb-c11a-4fe7-8f56-ba8507c4e765", + "label": "page4_text3", + "y": -4, + "originX": 0.5, + "originY": 0.5, + "text": "CAPTURES", + "fixedWidth": 600, + "align": "center", + "fontFamily": "CCComiccrazy", + "fontSize": "40px", + "fontStyle": "italic", + "color": "#000000" + }, + { + "type": "Text", + "id": "ac381a6d-7d3e-471a-a622-33fb3ae642aa", + "label": "page4_text4", + "y": 92, + "originX": 0.5, + "originY": 0.5, + "text": "If the last stone is dropped in an empty hole on the\nplayers own side, he captures all the stones from\nthe opponents hole directly opposite that hole,\nincluding his stone.", + "fixedWidth": 750, + "align": "center", + "fontFamily": "Arial", + "fontSize": "32px", + "color": "#000000" + } + ] + }, + { + "type": "Container", + "id": "7442b2f1-1619-428c-900a-b38edc6c316a", + "label": "page5", + "visible": false, + "list": [ + { + "type": "Text", + "id": "ccd19154-2374-4909-8315-1896a530f817", + "label": "page5_text1", + "y": -93, + "originX": 0.5, + "originY": 0.5, + "text": "HOW TO WIN", + "fixedWidth": 600, + "align": "center", + "fontFamily": "CCComiccrazy", + "fontSize": "40px", + "fontStyle": "italic", + "color": "#000000" + }, + { + "type": "Text", + "id": "f93e11e0-846c-4251-9566-6327cf672e2e", + "label": "page5_text2", + "y": 26, + "originX": 0.5, + "originY": 0.5, + "text": "The game is over when a player has no more\nstones on his side of the board. The winner is the\nplayer with the greatest total of stones in his or her\nmancala and any remaining stones on his or her\nside of the board.", + "fixedWidth": 750, + "align": "center", + "fontFamily": "Arial", + "fontSize": "32px", + "color": "#000000" + } + ] + }, + { + "type": "Image", + "id": "b5f3eee0-5d1d-4d90-9527-544cd5298008", + "label": "tab1", + "texture": { + "key": "mancala_help", + "frame": "tab" + }, + "x": 36, + "y": 270 + }, + { + "type": "Image", + "id": "c42ca810-4ca8-4cbd-8a89-5b2e83c9d612", + "label": "tab2", + "texture": { + "key": "mancala_help", + "frame": "tab" + }, + "x": 76, + "y": 270, + "alpha": 0.2, + "alphaTopLeft": 0.2, + "alphaTopRight": 0.2, + "alphaBottomLeft": 0.2, + "alphaBottomRight": 0.2 + }, + { + "type": "Image", + "id": "33a529c3-dd17-4793-872b-9cc2a7b4be17", + "label": "tab3", + "texture": { + "key": "mancala_help", + "frame": "tab" + }, + "x": 116, + "y": 270, + "alpha": 0.2, + "alphaTopLeft": 0.2, + "alphaTopRight": 0.2, + "alphaBottomLeft": 0.2, + "alphaBottomRight": 0.2 + }, + { + "type": "Image", + "id": "525b2732-e667-4260-a8de-69688e0188c0", + "label": "tab4", + "texture": { + "key": "mancala_help", + "frame": "tab" + }, + "x": 156, + "y": 270, + "alpha": 0.2, + "alphaTopLeft": 0.2, + "alphaTopRight": 0.2, + "alphaBottomLeft": 0.2, + "alphaBottomRight": 0.2 + }, + { + "type": "Image", + "id": "2ad1bf07-b638-445e-8452-770b6a8a33ba", + "label": "tab5", + "texture": { + "key": "mancala_help", + "frame": "tab" + }, + "x": 196, + "y": 270, + "alpha": 0.2, + "alphaTopLeft": 0.2, + "alphaTopRight": 0.2, + "alphaBottomLeft": 0.2, + "alphaBottomRight": 0.2 + }, + { + "type": "Text", + "id": "37cefc98-0e14-4772-82a1-d5c11efc42d6", + "label": "pageText", + "scope": "CLASS", + "x": 310, + "y": 269, + "originX": 0.5, + "originY": 0.5, + "alpha": 0.5, + "alphaTopLeft": 0.5, + "alphaTopRight": 0.5, + "alphaBottomLeft": 0.5, + "alphaBottomRight": 0.5, + "text": "Page 1 of 5", + "fixedWidth": 150, + "lineSpacing": 1, + "align": "center", + "fontFamily": "Arial Narrow", + "fontSize": "32px", + "color": "#ffffff" + }, + { + "type": "Image", + "id": "a192047d-2414-458a-a66e-e98d6b2a7270", + "label": "right_button", + "components": [ + "Button" + ], + "Button.spriteName": "blue-button", + "Button.callback": "() => this.nextPage()", + "texture": { + "key": "main", + "frame": "blue-button" + }, + "x": 512, + "y": 269 + }, + { + "type": "Image", + "id": "b333a7ff-ce60-43af-9405-bbe781b8adeb", + "label": "right_arrow", + "texture": { + "key": "main", + "frame": "blue-arrow" + }, + "x": 512, + "y": 267, + "angle": 90, + "flipX": true + }, + { + "type": "Image", + "id": "13ac76a9-2b3d-49bd-a268-a338bbedf3e5", + "label": "left_button", + "components": [ + "Button" + ], + "Button.spriteName": "blue-button", + "Button.callback": "() => this.prevPage()", + "texture": { + "key": "main", + "frame": "blue-button" + }, + "x": 452, + "y": 269 + }, + { + "type": "Image", + "id": "8244dfe1-5cd8-4c61-99d5-06301899e8b5", + "label": "left_arrow", + "texture": { + "key": "main", + "frame": "blue-arrow" + }, + "x": 452, + "y": 267, + "angle": 90, + "flipX": true, + "flipY": true + }, + { + "type": "Image", + "id": "74d3e62f-891d-4503-a6fe-3c959ba1a674", + "label": "x_button", + "components": [ + "Button" + ], + "Button.spriteName": "blue-button", + "Button.callback": "() => this.close()", + "texture": { + "key": "main", + "frame": "blue-button" + }, + "x": 510, + "y": -274 + }, + { + "type": "Image", + "id": "28586f60-7efc-424f-ab91-f02c7815475d", + "label": "blue_x", + "texture": { + "key": "main", + "frame": "blue-x" + }, + "x": 510, + "y": -276 + } + ] + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 4 + }, + "lists": [ + { + "id": "28802ee6-2a5b-4eec-8a6b-68b823862339", + "label": "indicators", + "objectIds": [ + "b5f3eee0-5d1d-4d90-9527-544cd5298008", + "c42ca810-4ca8-4cbd-8a89-5b2e83c9d612", + "33a529c3-dd17-4793-872b-9cc2a7b4be17", + "525b2732-e667-4260-a8de-69688e0188c0", + "2ad1bf07-b638-445e-8452-770b6a8a33ba" + ] + }, + { + "id": "6bed8884-59c5-446c-84eb-881cf67b0bd2", + "label": "pages", + "objectIds": [ + "ba97d037-8cd5-4063-b3aa-a5e36a1cfeea", + "6fe37283-25fd-4aef-80c4-7293818d7c05", + "28880a25-3dee-45bb-9054-52d559c267b7", + "b968c1e5-b899-4353-a6a6-cacd59246317", + "7442b2f1-1619-428c-900a-b38edc6c316a" + ] + } + ] +} \ No newline at end of file diff --git a/src/scenes/rooms/book/Book.js b/src/scenes/rooms/book/Book.js index 37e97536..bab037f2 100644 --- a/src/scenes/rooms/book/Book.js +++ b/src/scenes/rooms/book/Book.js @@ -109,6 +109,7 @@ export default class Book extends RoomScene { // poster (components) const posterButton = new Button(poster); posterButton.spriteName = "poster"; + posterButton.callback = () => this.onInstructionsClick(); posterButton.activeFrame = false; posterButton.pixelPerfect = true; @@ -124,6 +125,11 @@ export default class Book extends RoomScene { /* START-USER-CODE */ + + onInstructionsClick() { + this.interface.loadWidget('MancalaHelp') + } + /* END-USER-CODE */ } diff --git a/src/scenes/rooms/book/Book.scene b/src/scenes/rooms/book/Book.scene index 797369e6..84e35832 100644 --- a/src/scenes/rooms/book/Book.scene +++ b/src/scenes/rooms/book/Book.scene @@ -20,7 +20,6 @@ "type": "Image", "id": "8fc441d9-2cd2-4728-8d28-e81bc40d58c1", "label": "bg", - "components": [], "texture": { "key": "book", "frame": "bg" @@ -51,7 +50,6 @@ "type": "Image", "id": "3f068263-f4f5-4b66-88b0-078006583a4c", "label": "chair_back", - "components": [], "texture": { "key": "book", "frame": "chair_back" @@ -65,7 +63,6 @@ "type": "Image", "id": "587577af-f9ef-471a-849a-09a07bc115b1", "label": "chair_front", - "components": [], "texture": { "key": "book", "frame": "chair_front" @@ -79,7 +76,6 @@ "type": "Image", "id": "c9532f84-c85e-4dc4-bae4-aaaf8557e69e", "label": "chair_table", - "components": [], "texture": { "key": "book", "frame": "chair_table" @@ -97,6 +93,7 @@ "Button" ], "Button.spriteName": "poster", + "Button.callback": "() => this.onInstructionsClick()", "Button.activeFrame": false, "Button.pixelPerfect": true, "texture": { @@ -118,12 +115,9 @@ ], "label": "table104", "scope": "CLASS", - "components": [], "x": 1208, "y": 755, - "visible": true, - "nestedPrefabs": [], - "list": [] + "visible": true }, { "prefabId": "a31bdfcd-9fee-4e6e-b421-7edb8b8c7008", @@ -135,12 +129,9 @@ ], "label": "table103", "scope": "CLASS", - "components": [], "x": 806, "y": 690, - "visible": true, - "nestedPrefabs": [], - "list": [] + "visible": true }, { "prefabId": "a31bdfcd-9fee-4e6e-b421-7edb8b8c7008", @@ -152,12 +143,9 @@ ], "label": "table102", "scope": "CLASS", - "components": [], "x": 426, "y": 652, - "visible": true, - "nestedPrefabs": [], - "list": [] + "visible": true }, { "prefabId": "a31bdfcd-9fee-4e6e-b421-7edb8b8c7008", @@ -169,12 +157,9 @@ ], "label": "table101", "scope": "CLASS", - "components": [], "x": 951, "y": 453, - "visible": true, - "nestedPrefabs": [], - "list": [] + "visible": true }, { "prefabId": "a31bdfcd-9fee-4e6e-b421-7edb8b8c7008", @@ -185,11 +170,8 @@ ], "label": "table100", "scope": "CLASS", - "components": [], "x": 651, - "y": 450, - "nestedPrefabs": [], - "list": [] + "y": 450 } ], "plainObjects": [], @@ -197,7 +179,7 @@ "app": "Phaser Editor 2D - Scene Editor", "url": "https://phasereditor2d.com", "contentType": "phasereditor2d.core.scene.SceneContentType", - "version": 3 + "version": 4 }, "lists": [ { From 567a8646e3518825012a70afb68e94b4258a7626 Mon Sep 17 00:00:00 2001 From: ChrisCPI <92183829+ChrisCPI@users.noreply.github.com> Date: Tue, 8 Oct 2024 14:36:28 -0400 Subject: [PATCH 03/15] Add hints on HQ screens --- src/scenes/rooms/agent/Agent.js | 126 +++++++++------ src/scenes/rooms/agent/Agent.scene | 252 ++++++++++++++--------------- 2 files changed, 202 insertions(+), 176 deletions(-) diff --git a/src/scenes/rooms/agent/Agent.js b/src/scenes/rooms/agent/Agent.js index 0d111b40..f5186882 100644 --- a/src/scenes/rooms/agent/Agent.js +++ b/src/scenes/rooms/agent/Agent.js @@ -5,6 +5,7 @@ import Button from "../../components/Button"; import SimpleButton from "../../components/SimpleButton"; import MoveTo from "../../components/MoveTo"; import Zone from "../../components/Zone"; +import ShowHint from "../../components/ShowHint"; /* START-USER-IMPORTS */ /* END-USER-IMPORTS */ @@ -94,207 +95,182 @@ export default class Agent extends RoomScene { screenZones.visible = false; // beach - const beach = this.add.rectangle(1090, 311, 97, 71); + const beach = this.add.rectangle(1133.0873552635312, 352.90441144257784, 97, 71); beach.angle = 8; - beach.setOrigin(0, 0); beach.alpha = 0.5; beach.isFilled = true; beach.fillColor = 65280; screenZones.add(beach); // plaza - const plaza = this.add.rectangle(998, 306, 94, 71); + const plaza = this.add.rectangle(1043.7324374131858, 343.11865112930536, 94, 71); plaza.angle = 2; - plaza.setOrigin(0, 0); plaza.alpha = 0.5; plaza.isFilled = true; plaza.fillColor = 65280; screenZones.add(plaza); // pet - const pet = this.add.rectangle(901, 303, 96, 69); - pet.setOrigin(0, 0); + const pet = this.add.rectangle(949, 337.5, 96, 69); pet.alpha = 0.5; pet.isFilled = true; pet.fillColor = 65280; screenZones.add(pet); // forts - const forts = this.add.rectangle(801, 302, 96, 67); - forts.setOrigin(0, 0); + const forts = this.add.rectangle(849, 335.5, 96, 67); forts.alpha = 0.5; forts.isFilled = true; forts.fillColor = 65280; screenZones.add(forts); // coffee - const coffee = this.add.rectangle(681, 308, 94, 68); - coffee.setOrigin(0, 0); + const coffee = this.add.rectangle(728, 342, 94, 68); coffee.alpha = 0.5; coffee.isFilled = true; coffee.fillColor = 65280; screenZones.add(coffee); // book - const book = this.add.rectangle(574, 307, 94, 70); - book.setOrigin(0, 0); + const book = this.add.rectangle(621, 342, 94, 70); book.alpha = 0.5; book.isFilled = true; book.fillColor = 65280; screenZones.add(book); // lodge - const lodge = this.add.rectangle(475, 317, 96, 69); - lodge.setOrigin(0, 0); + const lodge = this.add.rectangle(523, 351.5, 96, 69); lodge.alpha = 0.5; lodge.isFilled = true; lodge.fillColor = 65280; screenZones.add(lodge); // sport - const sport = this.add.rectangle(374, 322, 95, 69); - sport.setOrigin(0, 0); + const sport = this.add.rectangle(421.5, 356.5, 95, 69); sport.alpha = 0.5; sport.isFilled = true; sport.fillColor = 65280; screenZones.add(sport); // beacon - const beacon = this.add.rectangle(1158, 229, 74, 75); + const beacon = this.add.rectangle(1184.8288705945015, 274.3372001349926, 74, 75); beacon.angle = 14; - beacon.setOrigin(0, 0); beacon.alpha = 0.5; beacon.isFilled = true; beacon.fillColor = 65280; screenZones.add(beacon); // light - const light = this.add.rectangle(1060, 214, 89, 69); + const light = this.add.rectangle(1101.985003206879, 251.52012361213565, 89, 69); light.angle = 4; - light.setOrigin(0, 0); light.alpha = 0.5; light.isFilled = true; light.fillColor = 65280; screenZones.add(light); // pizza - const pizza = this.add.rectangle(967, 207, 97, 69); + const pizza = this.add.rectangle(1012.9752595163882, 244.79914949461818, 97, 69); pizza.angle = 4; - pizza.setOrigin(0, 0); pizza.alpha = 0.5; pizza.isFilled = true; pizza.fillColor = 65280; screenZones.add(pizza); // rink - const rink = this.add.rectangle(870, 208, 100, 69); - rink.setOrigin(0, 0); + const rink = this.add.rectangle(920, 242.5, 100, 69); rink.alpha = 0.5; rink.isFilled = true; rink.fillColor = 65280; screenZones.add(rink); // shop - const shop = this.add.rectangle(787, 208, 96, 69); - shop.setOrigin(0, 0); + const shop = this.add.rectangle(835, 242.5, 96, 69); shop.alpha = 0.5; shop.isFilled = true; shop.fillColor = 65280; screenZones.add(shop); // town - const town = this.add.rectangle(698, 213, 97, 69); - town.setOrigin(0, 0); + const town = this.add.rectangle(746.5, 247.5, 97, 69); town.alpha = 0.5; town.isFilled = true; town.fillColor = 65280; screenZones.add(town); // dock - const dock = this.add.rectangle(604, 205, 96, 68); - dock.setOrigin(0, 0); + const dock = this.add.rectangle(652, 239, 96, 68); dock.alpha = 0.5; dock.isFilled = true; dock.fillColor = 65280; screenZones.add(dock); // dance - const dance = this.add.rectangle(508, 215, 93, 68); - dance.setOrigin(0, 0); + const dance = this.add.rectangle(554.5, 249, 93, 68); dance.alpha = 0.5; dance.isFilled = true; dance.fillColor = 65280; screenZones.add(dance); // lounge - const lounge = this.add.rectangle(411, 231, 100, 68); + const lounge = this.add.rectangle(465.24528816342354, 257.71045848727226, 100, 68); lounge.angle = -8; - lounge.setOrigin(0, 0); lounge.alpha = 0.5; lounge.isFilled = true; lounge.fillColor = 65280; screenZones.add(lounge); // attic - const attic = this.add.rectangle(312, 250, 96, 68); + const attic = this.add.rectangle(364.26475206017494, 276.9888046979904, 96, 68); attic.angle = -8; - attic.setOrigin(0, 0); attic.alpha = 0.5; attic.isFilled = true; attic.fillColor = 65280; screenZones.add(attic); // stage - const stage = this.add.rectangle(978, 117, 94, 71); - stage.setOrigin(0, 0); + const stage = this.add.rectangle(1025, 152.5, 94, 71); stage.alpha = 0.5; stage.isFilled = true; stage.fillColor = 65280; screenZones.add(stage); // cove - const cove = this.add.rectangle(882, 113, 93, 70); - cove.setOrigin(0, 0); + const cove = this.add.rectangle(928.5, 148, 93, 70); cove.alpha = 0.5; cove.isFilled = true; cove.fillColor = 65280; screenZones.add(cove); // forest - const forest = this.add.rectangle(793, 110, 83, 69); - forest.setOrigin(0, 0); + const forest = this.add.rectangle(834.5, 144.5, 83, 69); forest.alpha = 0.5; forest.isFilled = true; forest.fillColor = 65280; screenZones.add(forest); // dojo - const dojo = this.add.rectangle(695, 110, 94, 69); - dojo.setOrigin(0, 0); + const dojo = this.add.rectangle(742, 144.5, 94, 69); dojo.alpha = 0.5; dojo.isFilled = true; dojo.fillColor = 65280; screenZones.add(dojo); // mtn - const mtn = this.add.rectangle(599, 114, 95, 69); - mtn.setOrigin(0, 0); + const mtn = this.add.rectangle(646.5, 148.5, 95, 69); mtn.alpha = 0.5; mtn.isFilled = true; mtn.fillColor = 65280; screenZones.add(mtn); // village - const village = this.add.rectangle(498, 124, 94, 67); - village.setOrigin(0, 0); + const village = this.add.rectangle(545, 157.5, 94, 67); village.alpha = 0.5; village.isFilled = true; village.fillColor = 65280; screenZones.add(village); // dojoext - const dojoext = this.add.rectangle(400, 131, 87, 64); - dojoext.setOrigin(0, 0); + const dojoext = this.add.rectangle(443.5, 163, 87, 64); dojoext.alpha = 0.5; dojoext.isFilled = true; dojoext.fillColor = 65280; @@ -329,99 +305,149 @@ export default class Agent extends RoomScene { // beach (components) const beachZone = new Zone(beach); beachZone.callback = () => this.onScreenClick(400); + const beachShowHint = new ShowHint(beach); + beachShowHint.text = "beach_hint"; // plaza (components) const plazaZone = new Zone(plaza); plazaZone.callback = () => this.onScreenClick(300); + const plazaShowHint = new ShowHint(plaza); + plazaShowHint.text = "plaza_hint"; // pet (components) const petZone = new Zone(pet); petZone.callback = () => this.onScreenClick(310); + const petShowHint = new ShowHint(pet); + petShowHint.text = "pet_hint"; // forts (components) const fortsZone = new Zone(forts); fortsZone.callback = () => this.onScreenClick(801); + const fortsShowHint = new ShowHint(forts); + fortsShowHint.text = "forts_hint"; // coffee (components) const coffeeZone = new Zone(coffee); coffeeZone.callback = () => this.onScreenClick(110); + const coffeeShowHint = new ShowHint(coffee); + coffeeShowHint.text = "coffee_hint"; // book (components) const bookZone = new Zone(book); bookZone.callback = () => this.onScreenClick(111); + const bookShowHint = new ShowHint(book); + bookShowHint.text = "book_hint"; // lodge (components) const lodgeZone = new Zone(lodge); lodgeZone.callback = () => this.onScreenClick(220); + const lodgeShowHint = new ShowHint(lodge); + lodgeShowHint.text = "lodge_hint"; // sport (components) const sportZone = new Zone(sport); sportZone.callback = () => this.onScreenClick(210); + const sportShowHint = new ShowHint(sport); + sportShowHint.text = "sport_hint"; // beacon (components) new Zone(beacon); + const beaconShowHint = new ShowHint(beacon); + beaconShowHint.text = "beacon_hint"; // light (components) new Zone(light); + const lightShowHint = new ShowHint(light); + lightShowHint.text = "light_hint"; // pizza (components) const pizzaZone = new Zone(pizza); pizzaZone.callback = () =>{}; + const pizzaShowHint = new ShowHint(pizza); + pizzaShowHint.text = "pizza_hint"; // rink (components) const rinkZone = new Zone(rink); rinkZone.callback = () => this.onScreenClick(802); + const rinkShowHint = new ShowHint(rink); + rinkShowHint.text = "rink_hint"; // shop (components) const shopZone = new Zone(shop); shopZone.callback = () => this.onScreenClick(130); + const shopShowHint = new ShowHint(shop); + shopShowHint.text = "shop_hint"; // town (components) const townZone = new Zone(town); townZone.callback = () => this.onScreenClick(100); + const townShowHint = new ShowHint(town); + townShowHint.text = "town_hint"; // dock (components) const dockZone = new Zone(dock); dockZone.callback = () => this.onScreenClick(800); + const dockShowHint = new ShowHint(dock); + dockShowHint.text = "dock_hint"; // dance (components) const danceZone = new Zone(dance); danceZone.callback = () => this.onScreenClick(120); + const danceShowHint = new ShowHint(dance); + danceShowHint.text = "dance_hint"; // lounge (components) const loungeZone = new Zone(lounge); loungeZone.callback = () => this.onScreenClick(121); + const loungeShowHint = new ShowHint(lounge); + loungeShowHint.text = "lounge_hint"; // attic (components) const atticZone = new Zone(attic); atticZone.callback = () => this.onScreenClick(221); + const atticShowHint = new ShowHint(attic); + atticShowHint.text = "attic_hint"; // stage (components) new Zone(stage); + const stageShowHint = new ShowHint(stage); + stageShowHint.text = "stage_hint"; // cove (components) const coveZone = new Zone(cove); coveZone.callback = () => this.onScreenClick(810); + const coveShowHint = new ShowHint(cove); + coveShowHint.text = "cove_hint"; // forest (components) const forestZone = new Zone(forest); forestZone.callback = () => this.onScreenClick(809); + const forestShowHint = new ShowHint(forest); + forestShowHint.text = "forest_hint"; // dojo (components) const dojoZone = new Zone(dojo); dojoZone.callback = () => this.onScreenClick(320); + const dojoShowHint = new ShowHint(dojo); + dojoShowHint.text = "dojo_hint"; // mtn (components) const mtnZone = new Zone(mtn); mtnZone.callback = () => this.onScreenClick(230); + const mtnShowHint = new ShowHint(mtn); + mtnShowHint.text = "mtn_hint"; // village (components) const villageZone = new Zone(village); villageZone.callback = () => this.onScreenClick(200); + const villageShowHint = new ShowHint(village); + villageShowHint.text = "village_hint"; // dojoext (components) const dojoextZone = new Zone(dojoext); dojoextZone.callback = () => this.onScreenClick(321); + const dojoextShowHint = new ShowHint(dojoext); + dojoextShowHint.text = "dojoext_hint"; this.fish = fish; this.missions = missions; diff --git a/src/scenes/rooms/agent/Agent.scene b/src/scenes/rooms/agent/Agent.scene index 3a3be185..5aac16aa 100644 --- a/src/scenes/rooms/agent/Agent.scene +++ b/src/scenes/rooms/agent/Agent.scene @@ -198,14 +198,14 @@ "id": "c070e809-3311-48f4-b7aa-96577c06185f", "label": "beach", "components": [ - "Zone" + "Zone", + "ShowHint" ], "Zone.callback": "() => this.onScreenClick(400)", - "x": 1090, - "y": 311, + "ShowHint.text": "beach_hint", + "x": 1133.0873552635312, + "y": 352.90441144257784, "angle": 8, - "originX": 0, - "originY": 0, "alpha": 0.5, "isFilled": true, "fillColor": "#00ff00", @@ -217,14 +217,14 @@ "id": "84b63772-07cf-4602-b411-422d0b43a8a6", "label": "plaza", "components": [ - "Zone" + "Zone", + "ShowHint" ], "Zone.callback": "() => this.onScreenClick(300)", - "x": 998, - "y": 306, + "ShowHint.text": "plaza_hint", + "x": 1043.7324374131858, + "y": 343.11865112930536, "angle": 2, - "originX": 0, - "originY": 0, "alpha": 0.5, "isFilled": true, "fillColor": "#00ff00", @@ -236,13 +236,13 @@ "id": "2d0d8b0d-cb3e-4831-8739-9c5f17c55ff3", "label": "pet", "components": [ - "Zone" + "Zone", + "ShowHint" ], "Zone.callback": "() => this.onScreenClick(310)", - "x": 901, - "y": 303, - "originX": 0, - "originY": 0, + "ShowHint.text": "pet_hint", + "x": 949, + "y": 337.5, "alpha": 0.5, "isFilled": true, "fillColor": "#00ff00", @@ -254,13 +254,13 @@ "id": "22050ab9-8f66-416c-ae62-a852e28fc574", "label": "forts", "components": [ - "Zone" + "Zone", + "ShowHint" ], "Zone.callback": "() => this.onScreenClick(801)", - "x": 801, - "y": 302, - "originX": 0, - "originY": 0, + "ShowHint.text": "forts_hint", + "x": 849, + "y": 335.5, "alpha": 0.5, "isFilled": true, "fillColor": "#00ff00", @@ -272,13 +272,13 @@ "id": "cda22d5e-5794-42a7-aa89-ed33cf9efe1c", "label": "coffee", "components": [ - "Zone" + "Zone", + "ShowHint" ], "Zone.callback": "() => this.onScreenClick(110)", - "x": 681, - "y": 308, - "originX": 0, - "originY": 0, + "ShowHint.text": "coffee_hint", + "x": 728, + "y": 342, "alpha": 0.5, "isFilled": true, "fillColor": "#00ff00", @@ -290,13 +290,13 @@ "id": "eb25f1a1-32a2-4c4b-89d9-c73a751cd665", "label": "book", "components": [ - "Zone" + "Zone", + "ShowHint" ], "Zone.callback": "() => this.onScreenClick(111)", - "x": 574, - "y": 307, - "originX": 0, - "originY": 0, + "ShowHint.text": "book_hint", + "x": 621, + "y": 342, "alpha": 0.5, "isFilled": true, "fillColor": "#00ff00", @@ -308,13 +308,13 @@ "id": "00dd4bab-1985-4a6c-849d-fc62b236fa2e", "label": "lodge", "components": [ - "Zone" + "Zone", + "ShowHint" ], "Zone.callback": "() => this.onScreenClick(220)", - "x": 475, - "y": 317, - "originX": 0, - "originY": 0, + "ShowHint.text": "lodge_hint", + "x": 523, + "y": 351.5, "alpha": 0.5, "isFilled": true, "fillColor": "#00ff00", @@ -326,13 +326,13 @@ "id": "31ce60f6-3264-4973-ad2a-ab84e0aece22", "label": "sport", "components": [ - "Zone" + "Zone", + "ShowHint" ], "Zone.callback": "() => this.onScreenClick(210)", - "x": 374, - "y": 322, - "originX": 0, - "originY": 0, + "ShowHint.text": "sport_hint", + "x": 421.5, + "y": 356.5, "alpha": 0.5, "isFilled": true, "fillColor": "#00ff00", @@ -344,13 +344,13 @@ "id": "e6f70b09-bac7-4926-ab2f-a95f0fcee0dc", "label": "beacon", "components": [ - "Zone" + "Zone", + "ShowHint" ], - "x": 1158, - "y": 229, + "ShowHint.text": "beacon_hint", + "x": 1184.8288705945015, + "y": 274.3372001349926, "angle": 14, - "originX": 0, - "originY": 0, "alpha": 0.5, "isFilled": true, "fillColor": "#00ff00", @@ -362,13 +362,13 @@ "id": "09c2edc2-d5a3-401e-871a-f7c498a4a7da", "label": "light", "components": [ - "Zone" + "Zone", + "ShowHint" ], - "x": 1060, - "y": 214, + "ShowHint.text": "light_hint", + "x": 1101.985003206879, + "y": 251.52012361213565, "angle": 4, - "originX": 0, - "originY": 0, "alpha": 0.5, "isFilled": true, "fillColor": "#00ff00", @@ -380,14 +380,14 @@ "id": "f3a5f05d-a9df-455f-8e2c-0304c9bd0dbc", "label": "pizza", "components": [ - "Zone" + "Zone", + "ShowHint" ], "Zone.callback": "() =>{}", - "x": 967, - "y": 207, + "ShowHint.text": "pizza_hint", + "x": 1012.9752595163882, + "y": 244.79914949461818, "angle": 4, - "originX": 0, - "originY": 0, "alpha": 0.5, "isFilled": true, "fillColor": "#00ff00", @@ -399,13 +399,13 @@ "id": "4ae236af-2577-4e01-bcd4-b514cd9f8340", "label": "rink", "components": [ - "Zone" + "Zone", + "ShowHint" ], "Zone.callback": "() => this.onScreenClick(802)", - "x": 870, - "y": 208, - "originX": 0, - "originY": 0, + "ShowHint.text": "rink_hint", + "x": 920, + "y": 242.5, "alpha": 0.5, "isFilled": true, "fillColor": "#00ff00", @@ -417,13 +417,13 @@ "id": "831b588f-96e1-477b-8dea-6319fb3f289f", "label": "shop", "components": [ - "Zone" + "Zone", + "ShowHint" ], "Zone.callback": "() => this.onScreenClick(130)", - "x": 787, - "y": 208, - "originX": 0, - "originY": 0, + "ShowHint.text": "shop_hint", + "x": 835, + "y": 242.5, "alpha": 0.5, "isFilled": true, "fillColor": "#00ff00", @@ -435,13 +435,13 @@ "id": "a1a57b1a-3bc1-4117-a265-f8d2540717b8", "label": "town", "components": [ - "Zone" + "Zone", + "ShowHint" ], "Zone.callback": "() => this.onScreenClick(100)", - "x": 698, - "y": 213, - "originX": 0, - "originY": 0, + "ShowHint.text": "town_hint", + "x": 746.5, + "y": 247.5, "alpha": 0.5, "isFilled": true, "fillColor": "#00ff00", @@ -453,13 +453,13 @@ "id": "42673489-6ca3-4b06-9031-4ffb99d7696c", "label": "dock", "components": [ - "Zone" + "Zone", + "ShowHint" ], "Zone.callback": "() => this.onScreenClick(800)", - "x": 604, - "y": 205, - "originX": 0, - "originY": 0, + "ShowHint.text": "dock_hint", + "x": 652, + "y": 239, "alpha": 0.5, "isFilled": true, "fillColor": "#00ff00", @@ -471,13 +471,13 @@ "id": "9b052879-e0c8-4424-94eb-5ad04cd05a31", "label": "dance", "components": [ - "Zone" + "Zone", + "ShowHint" ], "Zone.callback": "() => this.onScreenClick(120)", - "x": 508, - "y": 215, - "originX": 0, - "originY": 0, + "ShowHint.text": "dance_hint", + "x": 554.5, + "y": 249, "alpha": 0.5, "isFilled": true, "fillColor": "#00ff00", @@ -489,14 +489,14 @@ "id": "7e447131-293b-4307-a1c7-7c38e7348d6b", "label": "lounge", "components": [ - "Zone" + "Zone", + "ShowHint" ], "Zone.callback": "() => this.onScreenClick(121)", - "x": 411, - "y": 231, + "ShowHint.text": "lounge_hint", + "x": 465.24528816342354, + "y": 257.71045848727226, "angle": -8, - "originX": 0, - "originY": 0, "alpha": 0.5, "isFilled": true, "fillColor": "#00ff00", @@ -508,14 +508,14 @@ "id": "4fecf3ab-3a42-4da6-9e57-ad78c80f5a57", "label": "attic", "components": [ - "Zone" + "Zone", + "ShowHint" ], "Zone.callback": "() => this.onScreenClick(221)", - "x": 312, - "y": 250, + "ShowHint.text": "attic_hint", + "x": 364.26475206017494, + "y": 276.9888046979904, "angle": -8, - "originX": 0, - "originY": 0, "alpha": 0.5, "isFilled": true, "fillColor": "#00ff00", @@ -527,12 +527,12 @@ "id": "cd62f32d-2b3e-439b-ac98-83af116c6840", "label": "stage", "components": [ - "Zone" + "Zone", + "ShowHint" ], - "x": 978, - "y": 117, - "originX": 0, - "originY": 0, + "ShowHint.text": "stage_hint", + "x": 1025, + "y": 152.5, "alpha": 0.5, "isFilled": true, "fillColor": "#00ff00", @@ -544,13 +544,13 @@ "id": "6ce50cd1-2a19-497d-9274-79fdbcb2e026", "label": "cove", "components": [ - "Zone" + "Zone", + "ShowHint" ], "Zone.callback": "() => this.onScreenClick(810)", - "x": 882, - "y": 113, - "originX": 0, - "originY": 0, + "ShowHint.text": "cove_hint", + "x": 928.5, + "y": 148, "alpha": 0.5, "isFilled": true, "fillColor": "#00ff00", @@ -562,13 +562,13 @@ "id": "3c72af6f-21d2-43b7-afcd-45f32181bb98", "label": "forest", "components": [ - "Zone" + "Zone", + "ShowHint" ], "Zone.callback": "() => this.onScreenClick(809)", - "x": 793, - "y": 110, - "originX": 0, - "originY": 0, + "ShowHint.text": "forest_hint", + "x": 834.5, + "y": 144.5, "alpha": 0.5, "isFilled": true, "fillColor": "#00ff00", @@ -580,13 +580,13 @@ "id": "f647ee24-1bd9-4cc0-9899-b3096ff80379", "label": "dojo", "components": [ - "Zone" + "Zone", + "ShowHint" ], "Zone.callback": "() => this.onScreenClick(320)", - "x": 695, - "y": 110, - "originX": 0, - "originY": 0, + "ShowHint.text": "dojo_hint", + "x": 742, + "y": 144.5, "alpha": 0.5, "isFilled": true, "fillColor": "#00ff00", @@ -598,13 +598,13 @@ "id": "ef1f7068-cc2e-42b2-ba09-7798af2e0625", "label": "mtn", "components": [ - "Zone" + "Zone", + "ShowHint" ], "Zone.callback": "() => this.onScreenClick(230)", - "x": 599, - "y": 114, - "originX": 0, - "originY": 0, + "ShowHint.text": "mtn_hint", + "x": 646.5, + "y": 148.5, "alpha": 0.5, "isFilled": true, "fillColor": "#00ff00", @@ -616,13 +616,13 @@ "id": "287ff487-eb85-431a-a00f-319ae6689035", "label": "village", "components": [ - "Zone" + "Zone", + "ShowHint" ], "Zone.callback": "() => this.onScreenClick(200)", - "x": 498, - "y": 124, - "originX": 0, - "originY": 0, + "ShowHint.text": "village_hint", + "x": 545, + "y": 157.5, "alpha": 0.5, "isFilled": true, "fillColor": "#00ff00", @@ -634,13 +634,13 @@ "id": "882fad60-f2a2-4b59-add0-593c0d98e524", "label": "dojoext", "components": [ - "Zone" + "Zone", + "ShowHint" ], "Zone.callback": "() => this.onScreenClick(321)", - "x": 400, - "y": 131, - "originX": 0, - "originY": 0, + "ShowHint.text": "dojoext_hint", + "x": 443.5, + "y": 163, "alpha": 0.5, "isFilled": true, "fillColor": "#00ff00", @@ -655,7 +655,7 @@ "app": "Phaser Editor 2D - Scene Editor", "url": "https://phasereditor2d.com", "contentType": "phasereditor2d.core.scene.SceneContentType", - "version": 5 + "version": 4 }, "lists": [ { From a10db92f40409da089ef16374128c8ea9bb87008 Mon Sep 17 00:00:00 2001 From: ChrisCPI <92183829+ChrisCPI@users.noreply.github.com> Date: Tue, 8 Oct 2024 14:36:40 -0400 Subject: [PATCH 04/15] Fix layering in Coffee --- src/scenes/rooms/coffee/Coffee.js | 2 +- src/scenes/rooms/coffee/Coffee.scene | 15 +-------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/src/scenes/rooms/coffee/Coffee.js b/src/scenes/rooms/coffee/Coffee.js index d216cf6c..169d3404 100644 --- a/src/scenes/rooms/coffee/Coffee.js +++ b/src/scenes/rooms/coffee/Coffee.js @@ -109,7 +109,7 @@ export default class Coffee extends RoomScene { door.setOrigin(0, 0); // lists - const sort = [beans, bag, sign_front, sign_back, counter_front, counter_back, table]; + const sort = [beans, sign_front, sign_back, counter_front, counter_back, table]; // smoke (components) const smokeAnimation = new Animation(smoke); diff --git a/src/scenes/rooms/coffee/Coffee.scene b/src/scenes/rooms/coffee/Coffee.scene index 0a267fb0..ad947b71 100644 --- a/src/scenes/rooms/coffee/Coffee.scene +++ b/src/scenes/rooms/coffee/Coffee.scene @@ -20,7 +20,6 @@ "type": "Image", "id": "e7ab62b8-6032-4b57-b05e-00934179e5c3", "label": "bg", - "components": [], "texture": { "key": "coffee", "frame": "bg" @@ -33,7 +32,6 @@ "type": "Image", "id": "acd6c4d4-4d4d-4825-b2bf-b4f31174a258", "label": "lamp", - "components": [], "texture": { "key": "coffee", "frame": "lamp" @@ -47,7 +45,6 @@ "type": "Image", "id": "5beaef60-3e4f-40a3-9fb3-01dc145bfeda", "label": "table", - "components": [], "texture": { "key": "coffee", "frame": "table" @@ -61,7 +58,6 @@ "type": "Image", "id": "07c938ab-f75d-4718-bf8b-cf3a5b619d64", "label": "counter_back", - "components": [], "texture": { "key": "coffee", "frame": "counter_back" @@ -75,7 +71,6 @@ "type": "Image", "id": "4025e1a5-f97d-4dba-87dd-4633cf3557bf", "label": "counter_front", - "components": [], "texture": { "key": "coffee", "frame": "counter_front" @@ -107,7 +102,6 @@ "type": "Image", "id": "9783525f-a865-4877-9de4-bf83985dcb6b", "label": "sign_back", - "components": [], "texture": { "key": "coffee", "frame": "sign_back" @@ -120,7 +114,6 @@ "type": "Image", "id": "2af1eeae-7993-4b46-98c7-a63e57822b27", "label": "sign_front", - "components": [], "texture": { "key": "coffee", "frame": "sign_front" @@ -153,7 +146,6 @@ "type": "Image", "id": "495e8163-ee24-4674-bfaf-3b1ab8d91de8", "label": "machine_1", - "components": [], "texture": { "key": "coffee", "frame": "machine_1" @@ -167,7 +159,6 @@ "type": "Image", "id": "188af677-d3b9-4bd5-a1e4-dfe2ce005467", "label": "machine_2", - "components": [], "texture": { "key": "coffee", "frame": "machine_2" @@ -181,7 +172,6 @@ "type": "Image", "id": "8a605348-9b6d-46e6-8e9a-a85c0ee0353d", "label": "machine_3", - "components": [], "texture": { "key": "coffee", "frame": "machine_3" @@ -195,7 +185,6 @@ "type": "Image", "id": "86a80e93-528d-45f0-baa2-6392cf65d675", "label": "bag", - "components": [], "texture": { "key": "coffee", "frame": "bag" @@ -231,7 +220,6 @@ "type": "Image", "id": "1bedd6e8-3870-49d0-9854-fbd028b74996", "label": "lamp_2", - "components": [], "texture": { "key": "coffee", "frame": "lamp_2" @@ -290,7 +278,7 @@ "app": "Phaser Editor 2D - Scene Editor", "url": "https://phasereditor2d.com", "contentType": "phasereditor2d.core.scene.SceneContentType", - "version": 3 + "version": 4 }, "lists": [ { @@ -298,7 +286,6 @@ "label": "sort", "objectIds": [ "86153e9a-e9e2-4608-b038-65a44c58761b", - "86a80e93-528d-45f0-baa2-6392cf65d675", "2af1eeae-7993-4b46-98c7-a63e57822b27", "9783525f-a865-4877-9de4-bf83985dcb6b", "4025e1a5-f97d-4dba-87dd-4633cf3557bf", From 0d391443677001ec5787c1b2b32fe5300b013797 Mon Sep 17 00:00:00 2001 From: ChrisCPI <92183829+ChrisCPI@users.noreply.github.com> Date: Tue, 8 Oct 2024 14:36:52 -0400 Subject: [PATCH 05/15] Add hint to Catchin Waves in Cove --- src/scenes/rooms/cove/Cove.js | 4 +++- src/scenes/rooms/cove/Cove.scene | 35 ++++---------------------------- 2 files changed, 7 insertions(+), 32 deletions(-) diff --git a/src/scenes/rooms/cove/Cove.js b/src/scenes/rooms/cove/Cove.js index b1057e52..ad8ae3eb 100644 --- a/src/scenes/rooms/cove/Cove.js +++ b/src/scenes/rooms/cove/Cove.js @@ -1,6 +1,6 @@ import RoomScene from '../RoomScene' -import { Animation, Button, MoveTo } from '@components/components' +import { Animation, Button, MoveTo, ShowHint } from '@components/components' /* START OF COMPILED CODE */ @@ -167,6 +167,8 @@ export default class Cove extends RoomScene { const hutMoveTo = new MoveTo(hut); hutMoveTo.x = 1250; hutMoveTo.y = 500; + const hutShowHint = new ShowHint(hut); + hutShowHint.text = "waves_hint"; // fire (components) const fireAnimation = new Animation(fire); diff --git a/src/scenes/rooms/cove/Cove.scene b/src/scenes/rooms/cove/Cove.scene index 6e6f3d06..73e7ff89 100644 --- a/src/scenes/rooms/cove/Cove.scene +++ b/src/scenes/rooms/cove/Cove.scene @@ -20,7 +20,6 @@ "type": "Image", "id": "685ecad6-3875-40e9-9934-40b9a6e47ffc", "label": "bg", - "components": [], "texture": { "key": "cove", "frame": "bg" @@ -34,7 +33,6 @@ "type": "Image", "id": "9ce4c0b0-b105-4dd2-9cf7-48c92b24f169", "label": "cliff_1", - "components": [], "texture": { "key": "cove", "frame": "cliff_1" @@ -48,7 +46,6 @@ "type": "Image", "id": "54a9f30d-d23c-45a2-b695-9218efef692b", "label": "water_water_15", - "components": [], "texture": { "key": "cove", "frame": "water/water_15" @@ -62,7 +59,6 @@ "type": "Image", "id": "d5f4964a-e666-4927-a80f-6baea0dd2580", "label": "water_water_14", - "components": [], "texture": { "key": "cove", "frame": "water/water_14" @@ -75,7 +71,6 @@ "type": "Image", "id": "250fc985-8606-4e36-8f66-8a468cad2dd2", "label": "water_water_13", - "components": [], "texture": { "key": "cove", "frame": "water/water_13" @@ -89,7 +84,6 @@ "type": "Image", "id": "ad116ec1-7ce0-4537-bc08-39c2f7ad28a1", "label": "water_water_12", - "components": [], "texture": { "key": "cove", "frame": "water/water_12" @@ -102,7 +96,6 @@ "type": "Image", "id": "7c816bc0-efc6-4978-b936-7ae8a3f644e1", "label": "water_water_11", - "components": [], "texture": { "key": "cove", "frame": "water/water_11" @@ -116,7 +109,6 @@ "type": "Image", "id": "390fbd69-dcec-47ed-8187-8a3db4ae1c95", "label": "water_water_10", - "components": [], "texture": { "key": "cove", "frame": "water/water_10" @@ -130,7 +122,6 @@ "type": "Image", "id": "e6ccbc4f-0c52-44a8-9d55-20e59c9d200f", "label": "water_water_9", - "components": [], "texture": { "key": "cove", "frame": "water/water_9" @@ -143,7 +134,6 @@ "type": "Image", "id": "f5efd64f-68b2-4531-b825-935500fee480", "label": "water_water_8", - "components": [], "texture": { "key": "cove", "frame": "water/water_8" @@ -156,7 +146,6 @@ "type": "Image", "id": "5795a848-8650-47a8-9149-5198bebcc437", "label": "water_water_7", - "components": [], "texture": { "key": "cove", "frame": "water/water_7" @@ -170,7 +159,6 @@ "type": "Image", "id": "eeb4a5d4-4e79-4fdb-a1b7-76fce3b66741", "label": "water_water_6", - "components": [], "texture": { "key": "cove", "frame": "water/water_6" @@ -184,7 +172,6 @@ "type": "Image", "id": "7faa8eca-d743-4d5e-89ab-28598d0356f3", "label": "water_water_5", - "components": [], "texture": { "key": "cove", "frame": "water/water_5" @@ -197,7 +184,6 @@ "type": "Image", "id": "89d42766-f9ae-43ab-bb1e-8fd083d64272", "label": "water_water_4", - "components": [], "texture": { "key": "cove", "frame": "water/water_4" @@ -211,7 +197,6 @@ "type": "Image", "id": "204af5d2-9dd2-47a6-b653-f5b0697711b9", "label": "water_water_3", - "components": [], "texture": { "key": "cove", "frame": "water/water_3" @@ -224,7 +209,6 @@ "type": "Image", "id": "aaa60bba-67ff-4ac2-876e-b3cfebd67132", "label": "water_water_2", - "components": [], "texture": { "key": "cove", "frame": "water/water_2" @@ -237,7 +221,6 @@ "type": "Image", "id": "3082ee9b-c2a6-4121-8fad-53338cdece4a", "label": "water_water_1", - "components": [], "texture": { "key": "cove", "frame": "water/water_1" @@ -252,12 +235,14 @@ "label": "hut", "components": [ "Button", - "MoveTo" + "MoveTo", + "ShowHint" ], "Button.spriteName": "hut", "Button.activeFrame": false, "MoveTo.x": 1250, "MoveTo.y": 500, + "ShowHint.text": "waves_hint", "texture": { "key": "cove", "frame": "hut" @@ -271,7 +256,6 @@ "type": "Image", "id": "bdcc462a-0951-487e-add4-61d60a995f24", "label": "hut_wall", - "components": [], "texture": { "key": "cove", "frame": "hut_wall" @@ -285,7 +269,6 @@ "type": "Image", "id": "79a1dfec-395e-4a21-a9f8-b09aeaabf9d6", "label": "boards", - "components": [], "texture": { "key": "cove", "frame": "boards" @@ -299,7 +282,6 @@ "type": "Image", "id": "7ab9af43-7533-4338-839a-67a25516cd87", "label": "rock_1", - "components": [], "texture": { "key": "cove", "frame": "rock_1" @@ -313,7 +295,6 @@ "type": "Image", "id": "0a1bb735-7c0b-4413-ade9-13179d4f0837", "label": "fg", - "components": [], "texture": { "key": "cove", "frame": "fg" @@ -327,7 +308,6 @@ "type": "Image", "id": "c00705fa-082d-4ad0-81ee-92b2bcfa4460", "label": "log_1", - "components": [], "texture": { "key": "cove", "frame": "log_1" @@ -359,7 +339,6 @@ "type": "Image", "id": "a8383932-be18-46d1-b4bf-19b662689e4a", "label": "chair_arm", - "components": [], "texture": { "key": "cove", "frame": "chair_arm" @@ -373,7 +352,6 @@ "type": "Image", "id": "d38ba832-8548-492f-b4bb-f3dbc74ee343", "label": "binoculars", - "components": [], "texture": { "key": "cove", "frame": "binoculars0001" @@ -387,7 +365,6 @@ "type": "Image", "id": "8fc7d735-cffd-4208-8411-0b29e7606c7b", "label": "silver_board", - "components": [], "texture": { "key": "cove", "frame": "silver_board" @@ -401,7 +378,6 @@ "type": "Image", "id": "b64c5402-0391-4e1d-812c-01a3d4f5c353", "label": "rock_4", - "components": [], "texture": { "key": "cove", "frame": "rock_4" @@ -415,7 +391,6 @@ "type": "Image", "id": "35270094-7aa8-4910-ade0-99f373a64195", "label": "rock_2", - "components": [], "texture": { "key": "cove", "frame": "rock_2" @@ -429,7 +404,6 @@ "type": "Image", "id": "1ec55d4a-8027-4492-8317-2ce1faa6c920", "label": "rock_3", - "components": [], "texture": { "key": "cove", "frame": "rock_3" @@ -443,7 +417,6 @@ "type": "Image", "id": "f75ee06c-c97b-4531-9ba3-41f88aae6538", "label": "hut_stool", - "components": [], "texture": { "key": "cove", "frame": "hut_stool" @@ -458,7 +431,7 @@ "app": "Phaser Editor 2D - Scene Editor", "url": "https://phasereditor2d.com", "contentType": "phasereditor2d.core.scene.SceneContentType", - "version": 3 + "version": 4 }, "lists": [ { From afa0fd296b643f57d7e0cd10246f207e73dd1c40 Mon Sep 17 00:00:00 2001 From: ChrisCPI <92183829+ChrisCPI@users.noreply.github.com> Date: Tue, 8 Oct 2024 14:36:59 -0400 Subject: [PATCH 06/15] Add music to Lounge --- src/scenes/rooms/lounge/Lounge.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/scenes/rooms/lounge/Lounge.js b/src/scenes/rooms/lounge/Lounge.js index 2122e8c9..36144d42 100644 --- a/src/scenes/rooms/lounge/Lounge.js +++ b/src/scenes/rooms/lounge/Lounge.js @@ -22,6 +22,8 @@ export default class Lounge extends RoomScene { 'astro': () => this.triggerGame(900) } + this.music = '6' + /* END-USER-CTR-CODE */ } From 57e0523070c5b7d07bc1cc9a9084696a8bb1332c Mon Sep 17 00:00:00 2001 From: ChrisCPI <92183829+ChrisCPI@users.noreply.github.com> Date: Tue, 8 Oct 2024 14:37:19 -0400 Subject: [PATCH 07/15] Put dance canopy parts in container in Town --- src/scenes/rooms/town/Town.js | 16 ++-- src/scenes/rooms/town/Town.scene | 132 +++++++++++++++---------------- 2 files changed, 73 insertions(+), 75 deletions(-) diff --git a/src/scenes/rooms/town/Town.js b/src/scenes/rooms/town/Town.js index 97cf0902..1b91ae7a 100644 --- a/src/scenes/rooms/town/Town.js +++ b/src/scenes/rooms/town/Town.js @@ -16,7 +16,7 @@ export default class Town extends RoomScene { this.disco_lights; /** @type {Phaser.GameObjects.Image} */ this.disco; - /** @type {Array} */ + /** @type {Array} */ this.sort; @@ -66,18 +66,24 @@ export default class Town extends RoomScene { const gift_door = this.add.image(995, 294, "town", "gift_door"); gift_door.setOrigin(0, 0); + // container + const container = this.add.container(692, 464); + // canopy - const canopy = this.add.image(692, 464, "town", "canopy"); + const canopy = this.add.image(0, 0, "town", "canopy"); canopy.setOrigin(0.49606299212598426, 0.9403669724770642); + container.add(canopy); // canopy_lights - const canopy_lights = this.add.sprite(648, 548, "town", "canopy_lights0001"); + const canopy_lights = this.add.sprite(-44, 84, "town", "canopy_lights0001"); canopy_lights.setOrigin(0, 7.142857142857143); canopy_lights.visible = false; + container.add(canopy_lights); // canopy_stars - const canopy_stars = this.add.image(647, 548, "town", "canopy_stars"); + const canopy_stars = this.add.image(-45, 84, "town", "canopy_stars"); canopy_stars.setOrigin(0, 7.142857142857143); + container.add(canopy_stars); // disco_lights const disco_lights = this.add.sprite(766, 332, "town", "disco_lights0007"); @@ -121,7 +127,7 @@ export default class Town extends RoomScene { table_1.setOrigin(0.49572649572649574, 0.7830188679245284); // lists - const sort = [fg, box_2, box_1, box_3, chair_2, chair_1, table_1, table_2, canopy, canopy_stars, canopy_lights]; + const sort = [fg, box_2, box_1, box_3, chair_2, chair_1, table_1, table_2, container]; // coffee_door (components) const coffee_doorButton = new Button(coffee_door); diff --git a/src/scenes/rooms/town/Town.scene b/src/scenes/rooms/town/Town.scene index 3b0eb2fd..cfb0c0dd 100644 --- a/src/scenes/rooms/town/Town.scene +++ b/src/scenes/rooms/town/Town.scene @@ -20,7 +20,6 @@ "type": "Image", "id": "21bbb0a2-0327-46f9-8472-29a729848d75", "label": "bg", - "components": [], "texture": { "key": "town", "frame": "bg" @@ -33,7 +32,6 @@ "type": "Image", "id": "79ce3240-4965-41fc-a51b-a2b6ec9c624d", "label": "fg", - "components": [], "texture": { "key": "town", "frame": "fg" @@ -47,7 +45,6 @@ "type": "Image", "id": "ee943a05-82e6-40f3-b909-728c73d766d2", "label": "left_sign", - "components": [], "texture": { "key": "town", "frame": "left_sign" @@ -61,7 +58,6 @@ "type": "Image", "id": "51de414e-abf0-47b2-ba0b-07aa8057153f", "label": "right_sign", - "components": [], "texture": { "key": "town", "frame": "right_sign" @@ -116,62 +112,68 @@ "originY": 0 }, { - "type": "Image", - "id": "bfabdf1f-c4c7-4ece-8599-ca93c8326447", - "label": "canopy", - "components": [ - "SimpleButton", - "MoveTo" - ], - "SimpleButton.hoverCallback": "() => this.onCanopyOver()", - "SimpleButton.hoverOutCallback": "() => this.onCanopyOut()", - "MoveTo.x": 684, - "MoveTo.y": 410, - "texture": { - "key": "town", - "frame": "canopy" - }, + "type": "Container", + "id": "cf24e85a-7b96-4461-b034-88e15ecdeb5d", + "label": "container", "x": 692, "y": 464, - "originX": 0.49606299212598426, - "originY": 0.9403669724770642 - }, - { - "type": "Sprite", - "id": "45fa492b-a213-4d30-acbe-ebe11fa805c1", - "label": "canopy_lights", - "scope": "CLASS", - "components": [ - "Animation" - ], - "Animation.key": "canopy_lights", - "Animation.end": 57, - "Animation.autoPlay": false, - "Animation.showOnStart": true, - "Animation.hideOnComplete": true, - "texture": { - "key": "town", - "frame": "canopy_lights0001" - }, - "x": 648, - "y": 548, - "originX": 0, - "originY": 7.142857142857143, - "visible": false - }, - { - "type": "Image", - "id": "cae986f7-795f-4d18-9618-d35f387c2e18", - "label": "canopy_stars", - "components": [], - "texture": { - "key": "town", - "frame": "canopy_stars" - }, - "x": 647, - "y": 548, - "originX": 0, - "originY": 7.142857142857143 + "list": [ + { + "type": "Image", + "id": "bfabdf1f-c4c7-4ece-8599-ca93c8326447", + "label": "canopy", + "components": [ + "SimpleButton", + "MoveTo" + ], + "SimpleButton.hoverCallback": "() => this.onCanopyOver()", + "SimpleButton.hoverOutCallback": "() => this.onCanopyOut()", + "MoveTo.x": 684, + "MoveTo.y": 410, + "texture": { + "key": "town", + "frame": "canopy" + }, + "originX": 0.49606299212598426, + "originY": 0.9403669724770642 + }, + { + "type": "Sprite", + "id": "34413ec7-1a83-4ebd-b1d9-4029ae5194cc", + "label": "canopy_lights", + "scope": "CLASS", + "components": [ + "Animation" + ], + "Animation.key": "canopy_lights", + "Animation.end": 57, + "Animation.autoPlay": false, + "Animation.showOnStart": true, + "Animation.hideOnComplete": true, + "texture": { + "key": "town", + "frame": "canopy_lights0001" + }, + "x": -44, + "y": 84, + "originX": 0, + "originY": 7.142857142857143, + "visible": false + }, + { + "type": "Image", + "id": "2dc5fcd9-a3f2-4dd4-aeda-f9dbc099af58", + "label": "canopy_stars", + "texture": { + "key": "town", + "frame": "canopy_stars" + }, + "x": -45, + "y": 84, + "originX": 0, + "originY": 7.142857142857143 + } + ] }, { "type": "Sprite", @@ -201,7 +203,6 @@ "id": "c71b8a27-c71e-4eab-81e9-86a8b3bf87c1", "label": "disco", "scope": "CLASS", - "components": [], "texture": { "key": "town", "frame": "disco" @@ -234,7 +235,6 @@ "type": "Image", "id": "d2f7523e-4ee3-4112-afea-1031b0bde58e", "label": "box_1", - "components": [], "texture": { "key": "town", "frame": "box_1" @@ -248,7 +248,6 @@ "type": "Image", "id": "0c94c016-2a42-4413-bfc0-abe028143024", "label": "box_2", - "components": [], "texture": { "key": "town", "frame": "box_2" @@ -262,7 +261,6 @@ "type": "Image", "id": "40a013ea-83e9-4eff-8634-46134d60d75a", "label": "box_3", - "components": [], "texture": { "key": "town", "frame": "box_3" @@ -276,7 +274,6 @@ "type": "Image", "id": "97ca136f-d936-4bb2-8db1-381245bfaa5b", "label": "chair_2", - "components": [], "texture": { "key": "town", "frame": "chair_2" @@ -290,7 +287,6 @@ "type": "Image", "id": "52130162-4cfc-4f67-b4b2-fa16fd824ee2", "label": "table_2", - "components": [], "texture": { "key": "town", "frame": "table_2" @@ -303,7 +299,6 @@ "type": "Image", "id": "da800ad3-3d6f-4c6b-be77-696bbf7e30b5", "label": "chair_1", - "components": [], "texture": { "key": "town", "frame": "chair_1" @@ -317,7 +312,6 @@ "type": "Image", "id": "dafb207c-e4d9-4941-83f8-9351f393e0a0", "label": "table_1", - "components": [], "texture": { "key": "town", "frame": "table_1" @@ -333,7 +327,7 @@ "app": "Phaser Editor 2D - Scene Editor", "url": "https://phasereditor2d.com", "contentType": "phasereditor2d.core.scene.SceneContentType", - "version": 3 + "version": 4 }, "lists": [ { @@ -348,9 +342,7 @@ "da800ad3-3d6f-4c6b-be77-696bbf7e30b5", "dafb207c-e4d9-4941-83f8-9351f393e0a0", "52130162-4cfc-4f67-b4b2-fa16fd824ee2", - "bfabdf1f-c4c7-4ece-8599-ca93c8326447", - "cae986f7-795f-4d18-9618-d35f387c2e18", - "45fa492b-a213-4d30-acbe-ebe11fa805c1" + "cf24e85a-7b96-4461-b034-88e15ecdeb5d" ] } ] From f1f57a73a55274799ef303327a5848aa6f64d8f0 Mon Sep 17 00:00:00 2001 From: ChrisCPI <92183829+ChrisCPI@users.noreply.github.com> Date: Tue, 8 Oct 2024 14:37:34 -0400 Subject: [PATCH 08/15] Stop music when game is over in Card Jitsu --- src/scenes/games/card/CardJitsu.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index bc67c873..00c07a98 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -472,6 +472,7 @@ export default class CardJitsu extends GameScene { cards[i].tweenToOver(i) } + this.stopMusic() this.soundManager.play('end') this.time.delayedCall(1000, () => this.playGameOver(winSeat, !winCards.length)) From c31ebcb246396d091b2f1de050a36e7ef2a220d6 Mon Sep 17 00:00:00 2001 From: ChrisCPI <92183829+ChrisCPI@users.noreply.github.com> Date: Tue, 8 Oct 2024 16:18:43 -0400 Subject: [PATCH 09/15] Add Pizza Parlor --- src/data/rooms.js | 6 + src/scenes/rooms/pizza/Pizza.js | 256 ++++++++++++++++ src/scenes/rooms/pizza/Pizza.scene | 465 +++++++++++++++++++++++++++++ src/scenes/rooms/plaza/Plaza.js | 2 +- 4 files changed, 728 insertions(+), 1 deletion(-) create mode 100644 src/scenes/rooms/pizza/Pizza.js create mode 100644 src/scenes/rooms/pizza/Pizza.scene diff --git a/src/data/rooms.js b/src/data/rooms.js index 90b4eeb4..c4197aa9 100644 --- a/src/data/rooms.js +++ b/src/data/rooms.js @@ -89,6 +89,12 @@ const rooms = { x: 780, y: 790 }, + 330: { + key: 'Pizza', + scene: require('@rooms/pizza/Pizza').default, + x: 800, + y: 556 + }, 400: { key: 'Beach', scene: require('@rooms/beach/Beach').default, diff --git a/src/scenes/rooms/pizza/Pizza.js b/src/scenes/rooms/pizza/Pizza.js new file mode 100644 index 00000000..61653602 --- /dev/null +++ b/src/scenes/rooms/pizza/Pizza.js @@ -0,0 +1,256 @@ +/* START OF COMPILED CODE */ + +import RoomScene from "../RoomScene"; +import Button from "../../components/Button"; +import MoveTo from "../../components/MoveTo"; +import ShowHint from "../../components/ShowHint"; +import Animation from "../../components/Animation"; +import Zone from "../../components/Zone"; +/* START-USER-IMPORTS */ +/* END-USER-IMPORTS */ + +export default class Pizza extends RoomScene { + + constructor() { + super("Pizza"); + + /** @type {Phaser.GameObjects.Sprite} */ + this.book; + /** @type {Phaser.GameObjects.Sprite} */ + this.cash; + /** @type {Array} */ + this.sort; + + + /* START-USER-CTR-CODE */ + + this.roomTriggers = { + plaza: () => this.triggerRoom(300, 1110, 580), + pizzatron: null + } + + this.music = '20' + + /* END-USER-CTR-CODE */ + } + + /** @returns {void} */ + _preload() { + + this.load.pack("pizza-pack", "assets/media/rooms/pizza/pizza-pack.json"); + } + + /** @returns {void} */ + _create() { + + // bg + this.add.image(764, 480, "pizza", "bg"); + + // kitchen + this.add.image(393.7, 35.3, "pizza", "kitchen"); + + // door + const door = this.add.image(840, 267, "pizza", "door"); + + // kitchen_door + const kitchen_door = this.add.image(396.2591247558594, 197.7699432373047, "pizza", "kitchen_door"); + kitchen_door.setOrigin(0.509836937003536, 0.3761316356689409); + + // steam + const steam = this.add.sprite(57, 154, "pizza", "steam0001"); + + // deskContainer + const deskContainer = this.add.container(534, 452); + + // desk + const desk = this.add.image(0, -23, "pizza", "desk/desk"); + deskContainer.add(desk); + + // book + const book = this.add.sprite(73, -109, "pizza", "desk/book0001"); + deskContainer.add(book); + + // cash + const cash = this.add.sprite(-66, -141, "pizza", "desk/cash0001"); + deskContainer.add(cash); + + // cashZone + const cashZone = this.add.rectangle(-66.4, -123.9, 110, 98); + cashZone.alpha = 0.5; + cashZone.isFilled = true; + cashZone.fillColor = 65280; + deskContainer.add(cashZone); + + // bookZone + const bookZone = this.add.rectangle(74, -94, 134, 34); + bookZone.alpha = 0.5; + bookZone.isFilled = true; + bookZone.fillColor = 65280; + deskContainer.add(bookZone); + + // piano + const piano = this.add.image(1339.481689453125, 440.89052393296305, "pizza", "piano"); + piano.setOrigin(0.40765680693892903, 0.6082990446357159); + + // chair2 + const chair2 = this.add.image(576, 584, "pizza", "chair"); + chair2.setOrigin(0.506083670741084, 0.388330843730328); + + // chair1 + const chair1 = this.add.image(414, 584, "pizza", "chair"); + chair1.setOrigin(0.506083670741084, 0.388330843730328); + chair1.flipX = true; + + // table1Container + const table1Container = this.add.container(486, 684); + + // table1 + const table1 = this.add.image(6.9, -22.5, "pizza", "table/table"); + table1Container.add(table1); + + // candle1 + const candle1 = this.add.sprite(10.4, -106.6, "pizza", "table/candle0001"); + table1Container.add(candle1); + + // chair4 + const chair4 = this.add.image(843.5, 700, "pizza", "chair"); + chair4.setOrigin(0.506083670741084, 0.388330843730328); + + // chair3 + const chair3 = this.add.image(682, 700, "pizza", "chair"); + chair3.setOrigin(0.506083670741084, 0.388330843730328); + chair3.flipX = true; + + // table2Container + const table2Container = this.add.container(774, 794); + + // table2 + const table2 = this.add.image(-7.6, -23, "pizza", "table/table"); + table2.flipX = true; + table2Container.add(table2); + + // candle2 + const candle2 = this.add.sprite(-10.4, -106, "pizza", "table/candle0001"); + candle2.flipX = true; + table2Container.add(candle2); + + // chair5 + const chair5 = this.add.image(982.5, 664.5, "pizza", "chair"); + chair5.setOrigin(0.506083670741084, 0.388330843730328); + chair5.flipX = true; + + // chair6 + const chair6 = this.add.image(1154, 658, "pizza", "chair"); + chair6.setOrigin(0.506083670741084, 0.388330843730328); + + // table3Container + const table3Container = this.add.container(1074, 752); + + // table3 + const table3 = this.add.image(-7.6, -23, "pizza", "table/table"); + table3.flipX = true; + table3Container.add(table3); + + // candle3 + const candle3 = this.add.sprite(-10.4, -106, "pizza", "table/candle0001"); + candle3.flipX = true; + table3Container.add(candle3); + + // pan + const pan = this.add.image(142.51476047863997, 700.7032584843068, "pizza", "pan"); + pan.setOrigin(0.10074519791324657, 0.971436461221082); + + // oven + const oven = this.add.image(6.861707159353852, 768.720386854, "pizza", "oven"); + oven.setOrigin(0.005557987954675192, 0.865012182798766); + + // fire + const fire = this.add.sprite(124, 769.8586163235276, "pizza", "fire0001"); + fire.setOrigin(0.5, 0.5791703111763603); + + // fg + const fg = this.add.image(4, 956, "pizza", "fg"); + fg.setOrigin(0, 1); + + // lists + const sort = [pan, fg, piano, chair2, oven, fire, deskContainer, table1Container, table2Container, table3Container, chair4, chair3]; + + // door (components) + const doorButton = new Button(door); + doorButton.spriteName = "door"; + doorButton.activeFrame = false; + const doorMoveTo = new MoveTo(door); + doorMoveTo.x = 828; + doorMoveTo.y = 460; + + // kitchen_door (components) + const kitchen_doorButton = new Button(kitchen_door); + kitchen_doorButton.spriteName = "kitchen_door"; + kitchen_doorButton.activeFrame = false; + const kitchen_doorMoveTo = new MoveTo(kitchen_door); + kitchen_doorMoveTo.x = 400; + kitchen_doorMoveTo.y = 420; + const kitchen_doorShowHint = new ShowHint(kitchen_door); + kitchen_doorShowHint.text = "pizzatron_hint"; + + // steam (components) + const steamAnimation = new Animation(steam); + steamAnimation.key = "steam"; + steamAnimation.end = 5; + + // cashZone (components) + const cashZoneZone = new Zone(cashZone); + cashZoneZone.hoverCallback = () => this.onCashOver(); + + // bookZone (components) + const bookZoneZone = new Zone(bookZone); + bookZoneZone.hoverCallback = () => this.onBookOver(); + + // candle1 (components) + const candle1Animation = new Animation(candle1); + candle1Animation.key = "table/candle"; + candle1Animation.end = 14; + + // candle2 (components) + const candle2Animation = new Animation(candle2); + candle2Animation.key = "table/candle"; + candle2Animation.end = 14; + + // candle3 (components) + const candle3Animation = new Animation(candle3); + candle3Animation.key = "table/candle"; + candle3Animation.end = 14; + + // fire (components) + const fireAnimation = new Animation(fire); + fireAnimation.key = "fire"; + fireAnimation.end = 8; + + this.book = book; + this.cash = cash; + this.sort = sort; + + this.events.emit("scene-awake"); + } + + + /* START-USER-CODE */ + + onCashOver() { + const frame = parseInt(this.cash.frame.name.slice(-4)) + + if (frame === 1) { + this.cash.play('pizza/cash_in') + } else if (frame === 22) { + this.cash.play('pizza/cash_out') + } + } + + onBookOver() { + this.book.play('pizza/book') + } + + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ \ No newline at end of file diff --git a/src/scenes/rooms/pizza/Pizza.scene b/src/scenes/rooms/pizza/Pizza.scene new file mode 100644 index 00000000..9c1a09a7 --- /dev/null +++ b/src/scenes/rooms/pizza/Pizza.scene @@ -0,0 +1,465 @@ +{ + "id": "010ffb6a-9cb5-4191-9504-220520fa154d", + "sceneType": "SCENE", + "settings": { + "compilerInsertSpaces": true, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "autoImport": true, + "superClassName": "RoomScene", + "preloadMethodName": "_preload", + "preloadPackFiles": [ + "yukon/assets/media/rooms/pizza/pizza-pack.json" + ], + "createMethodName": "_create", + "sceneKey": "Pizza", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Image", + "id": "a9b2d25f-7379-4d28-a975-016e80b7daad", + "label": "bg", + "texture": { + "key": "pizza", + "frame": "bg" + }, + "x": 764, + "y": 480 + }, + { + "type": "Image", + "id": "c120ad4c-c88e-4e34-9c70-bdcf1d5ae591", + "label": "kitchen", + "texture": { + "key": "pizza", + "frame": "kitchen" + }, + "x": 393.7, + "y": 35.3 + }, + { + "type": "Image", + "id": "3f2b6fcc-d9e3-4bc6-a3c4-faf64af21e2a", + "label": "door", + "components": [ + "Button", + "MoveTo" + ], + "Button.spriteName": "door", + "Button.activeFrame": false, + "MoveTo.x": "828", + "MoveTo.y": "460", + "texture": { + "key": "pizza", + "frame": "door" + }, + "x": 840, + "y": 267 + }, + { + "type": "Image", + "id": "2b98239c-112a-4d62-9c2e-969c6df38bc1", + "label": "kitchen_door", + "components": [ + "Button", + "MoveTo", + "ShowHint" + ], + "Button.spriteName": "kitchen_door", + "Button.activeFrame": false, + "MoveTo.x": "400", + "MoveTo.y": "420", + "ShowHint.text": "pizzatron_hint", + "texture": { + "key": "pizza", + "frame": "kitchen_door" + }, + "x": 396.2591247558594, + "y": 197.7699432373047, + "originX": 0.509836937003536, + "originY": 0.3761316356689409 + }, + { + "type": "Sprite", + "id": "c3a487f6-fe7e-4cfa-9d9f-44547e63db5d", + "label": "steam", + "components": [ + "Animation" + ], + "Animation.key": "steam", + "Animation.end": 5, + "texture": { + "key": "pizza", + "frame": "steam0001" + }, + "x": 57, + "y": 154 + }, + { + "type": "Container", + "id": "dad75c12-55e6-4d71-9cb3-fe2b945ff07a", + "label": "deskContainer", + "x": 534, + "y": 452, + "list": [ + { + "type": "Image", + "id": "bc6ccc2b-fcd0-4f0f-bd4d-5257d2ad97ca", + "label": "desk", + "texture": { + "key": "pizza", + "frame": "desk/desk" + }, + "y": -23 + }, + { + "type": "Sprite", + "id": "ec266ee0-b6b4-4304-bbd8-c68eb77e4c5b", + "label": "book", + "scope": "CLASS", + "texture": { + "key": "pizza", + "frame": "desk/book0001" + }, + "x": 73, + "y": -109 + }, + { + "type": "Sprite", + "id": "a0bd95af-4ddd-4c2c-beb1-233049963a87", + "label": "cash", + "scope": "CLASS", + "texture": { + "key": "pizza", + "frame": "desk/cash0001" + }, + "x": -66, + "y": -141 + }, + { + "type": "Rectangle", + "id": "9eb0388e-05bd-4ad3-aa72-3b4724cb96a6", + "label": "cashZone", + "components": [ + "Zone" + ], + "Zone.hoverCallback": "() => this.onCashOver()", + "x": -66.4, + "y": -123.9, + "alpha": 0.5, + "isFilled": true, + "fillColor": "#00ff00", + "width": 110, + "height": 98 + }, + { + "type": "Rectangle", + "id": "db5e7253-c5e7-4202-b22e-ed74060e9d0c", + "label": "bookZone", + "components": [ + "Zone" + ], + "Zone.hoverCallback": "() => this.onBookOver()", + "x": 74, + "y": -94, + "alpha": 0.5, + "isFilled": true, + "fillColor": "#00ff00", + "width": 134, + "height": 34 + } + ] + }, + { + "type": "Image", + "id": "c5cce81e-95b5-4de9-ba98-0543e06ea197", + "label": "piano", + "texture": { + "key": "pizza", + "frame": "piano" + }, + "x": 1339.481689453125, + "y": 440.89052393296305, + "originX": 0.40765680693892903, + "originY": 0.6082990446357159 + }, + { + "type": "Image", + "id": "0d93246a-01b5-4587-9cbf-1038c14f2329", + "label": "chair2", + "texture": { + "key": "pizza", + "frame": "chair" + }, + "x": 576, + "y": 584, + "originX": 0.506083670741084, + "originY": 0.388330843730328 + }, + { + "type": "Image", + "id": "a6178809-b14c-414f-a66f-f88fde977c57", + "label": "chair1", + "texture": { + "key": "pizza", + "frame": "chair" + }, + "x": 414, + "y": 584, + "originX": 0.506083670741084, + "originY": 0.388330843730328, + "flipX": true + }, + { + "type": "Container", + "id": "dd3f8d36-ac11-414a-866c-c4c47129edef", + "label": "table1Container", + "x": 486, + "y": 684, + "list": [ + { + "type": "Image", + "id": "b623e6ff-1d7e-48dc-a198-ad549ae5e290", + "label": "table1", + "texture": { + "key": "pizza", + "frame": "table/table" + }, + "x": 6.9, + "y": -22.5 + }, + { + "type": "Sprite", + "id": "3e8fae01-efab-4b3b-bb19-51407fb5bc7e", + "label": "candle1", + "components": [ + "Animation" + ], + "Animation.key": "table/candle", + "Animation.end": 14, + "texture": { + "key": "pizza", + "frame": "table/candle0001" + }, + "x": 10.4, + "y": -106.6 + } + ] + }, + { + "type": "Image", + "id": "81f8464c-e2c3-484c-a2f8-24db224e78e4", + "label": "chair4", + "texture": { + "key": "pizza", + "frame": "chair" + }, + "x": 843.5, + "y": 700, + "originX": 0.506083670741084, + "originY": 0.388330843730328 + }, + { + "type": "Image", + "id": "3efbc3b2-68c2-45a6-a9cd-6a9d1fad2f06", + "label": "chair3", + "texture": { + "key": "pizza", + "frame": "chair" + }, + "x": 682, + "y": 700, + "originX": 0.506083670741084, + "originY": 0.388330843730328, + "flipX": true + }, + { + "type": "Container", + "id": "51589c43-c190-4139-bc89-4e135cbde652", + "label": "table2Container", + "x": 774, + "y": 794, + "list": [ + { + "type": "Image", + "id": "4c7085d7-8c17-423a-b5ca-097466b5b9f4", + "label": "table2", + "texture": { + "key": "pizza", + "frame": "table/table" + }, + "x": -7.6, + "y": -23, + "flipX": true + }, + { + "type": "Sprite", + "id": "53cd1038-f434-49af-9dfd-3194f012f6bc", + "label": "candle2", + "components": [ + "Animation" + ], + "Animation.key": "table/candle", + "Animation.end": 14, + "texture": { + "key": "pizza", + "frame": "table/candle0001" + }, + "x": -10.4, + "y": -106, + "flipX": true + } + ] + }, + { + "type": "Image", + "id": "d7acab73-a7dc-4902-983d-14a8afa03b5d", + "label": "chair5", + "texture": { + "key": "pizza", + "frame": "chair" + }, + "x": 982.5, + "y": 664.5, + "originX": 0.506083670741084, + "originY": 0.388330843730328, + "flipX": true + }, + { + "type": "Image", + "id": "47f19e87-e750-4e56-8c11-14c0c1992335", + "label": "chair6", + "texture": { + "key": "pizza", + "frame": "chair" + }, + "x": 1154, + "y": 658, + "originX": 0.506083670741084, + "originY": 0.388330843730328 + }, + { + "type": "Container", + "id": "4c858d4f-ca61-4bb5-b747-a53b66c4f8c5", + "label": "table3Container", + "x": 1074, + "y": 752, + "list": [ + { + "type": "Image", + "id": "bce8248a-841f-4f3e-a948-709d51ee1ec0", + "label": "table3", + "texture": { + "key": "pizza", + "frame": "table/table" + }, + "x": -7.6, + "y": -23, + "flipX": true + }, + { + "type": "Sprite", + "id": "03ddd42f-9a95-4d87-8f9e-9a4fe1a92f7a", + "label": "candle3", + "components": [ + "Animation" + ], + "Animation.key": "table/candle", + "Animation.end": 14, + "texture": { + "key": "pizza", + "frame": "table/candle0001" + }, + "x": -10.4, + "y": -106, + "flipX": true + } + ] + }, + { + "type": "Image", + "id": "ee039270-f45b-4d74-9361-66d08f491e6f", + "label": "pan", + "texture": { + "key": "pizza", + "frame": "pan" + }, + "x": 142.51476047863997, + "y": 700.7032584843068, + "originX": 0.10074519791324657, + "originY": 0.971436461221082 + }, + { + "type": "Image", + "id": "dbf9378e-5df0-4b5f-8b1c-bd0b381b9ffa", + "label": "oven", + "texture": { + "key": "pizza", + "frame": "oven" + }, + "x": 6.861707159353852, + "y": 768.720386854, + "originX": 0.005557987954675192, + "originY": 0.865012182798766 + }, + { + "type": "Sprite", + "id": "c57b28bc-8326-4ddf-9275-033cbef67db0", + "label": "fire", + "components": [ + "Animation" + ], + "Animation.key": "fire", + "Animation.end": 8, + "texture": { + "key": "pizza", + "frame": "fire0001" + }, + "x": 124, + "y": 769.8586163235276, + "originY": 0.5791703111763603 + }, + { + "type": "Image", + "id": "0a944c35-024c-4b78-9a5c-b6530b9f6d68", + "label": "fg", + "texture": { + "key": "pizza", + "frame": "fg" + }, + "x": 4, + "y": 956, + "originX": 0, + "originY": 1 + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 4 + }, + "lists": [ + { + "id": "87be1223-c14f-4cd1-bf7c-8682a4274cc8", + "label": "sort", + "objectIds": [ + "ee039270-f45b-4d74-9361-66d08f491e6f", + "0a944c35-024c-4b78-9a5c-b6530b9f6d68", + "c5cce81e-95b5-4de9-ba98-0543e06ea197", + "0d93246a-01b5-4587-9cbf-1038c14f2329", + "dbf9378e-5df0-4b5f-8b1c-bd0b381b9ffa", + "c57b28bc-8326-4ddf-9275-033cbef67db0", + "dad75c12-55e6-4d71-9cb3-fe2b945ff07a", + "dd3f8d36-ac11-414a-866c-c4c47129edef", + "51589c43-c190-4139-bc89-4e135cbde652", + "4c858d4f-ca61-4bb5-b747-a53b66c4f8c5", + "81f8464c-e2c3-484c-a2f8-24db224e78e4", + "3efbc3b2-68c2-45a6-a9cd-6a9d1fad2f06" + ] + } + ] +} \ No newline at end of file diff --git a/src/scenes/rooms/plaza/Plaza.js b/src/scenes/rooms/plaza/Plaza.js index bd397a8c..ab0eef11 100644 --- a/src/scenes/rooms/plaza/Plaza.js +++ b/src/scenes/rooms/plaza/Plaza.js @@ -22,7 +22,7 @@ export default class Plaza extends RoomScene { 'cave': () => this.triggerRoom(806, 1180, 614), 'stage1': null, 'stage2': null, - 'pizza': null, + 'pizza': () => this.triggerRoom(330, 828, 500), 'forest': () => this.triggerRoom(809, 270, 430) } From a85cb620128a34d837fa3c3dc16ae8db2e40a1a3 Mon Sep 17 00:00:00 2001 From: ChrisCPI <92183829+ChrisCPI@users.noreply.github.com> Date: Tue, 8 Oct 2024 17:13:21 -0400 Subject: [PATCH 10/15] Add Boiler --- src/data/rooms.js | 6 + src/scenes/rooms/boiler/Boiler.js | 147 +++++++++++++++++++++ src/scenes/rooms/boiler/Boiler.scene | 189 +++++++++++++++++++++++++++ src/scenes/rooms/cave/Cave.js | 2 +- src/scenes/rooms/dance/Dance.js | 2 +- 5 files changed, 344 insertions(+), 2 deletions(-) create mode 100644 src/scenes/rooms/boiler/Boiler.js create mode 100644 src/scenes/rooms/boiler/Boiler.scene diff --git a/src/data/rooms.js b/src/data/rooms.js index c4197aa9..c23294fd 100644 --- a/src/data/rooms.js +++ b/src/data/rooms.js @@ -125,6 +125,12 @@ const rooms = { x: 748, y: 720 }, + 804: { + key: 'Boiler', + scene: require('@rooms/boiler/Boiler').default, + x: 780, + y: 700 + }, 805: { key: 'Berg', scene: require('@rooms/berg/Berg').default, diff --git a/src/scenes/rooms/boiler/Boiler.js b/src/scenes/rooms/boiler/Boiler.js new file mode 100644 index 00000000..96ad51cd --- /dev/null +++ b/src/scenes/rooms/boiler/Boiler.js @@ -0,0 +1,147 @@ +/* START OF COMPILED CODE */ + +import RoomScene from "../RoomScene"; +import Button from "../../components/Button"; +import MoveTo from "../../components/MoveTo"; +import Animation from "../../components/Animation"; +import SimpleButton from "../../components/SimpleButton"; +import ShowHint from "../../components/ShowHint"; +import Zone from "../../components/Zone"; +/* START-USER-IMPORTS */ +/* END-USER-IMPORTS */ + +export default class Boiler extends RoomScene { + + constructor() { + super("Boiler"); + + /** @type {Phaser.GameObjects.Image} */ + this.archives_icon; + /** @type {Phaser.GameObjects.Sprite} */ + this.cab; + + + /* START-USER-CTR-CODE */ + + this.roomTriggers = { + cave: () => this.triggerRoom(806, 328, 646), + dance: () => this.triggerRoom(120, 980, 560) + } + + this.music = '6' + + /* END-USER-CTR-CODE */ + } + + /** @returns {void} */ + _preload() { + + this.load.pack("boiler-pack", "assets/media/rooms/boiler/boiler-pack.json"); + } + + /** @returns {void} */ + _create() { + + // bg + this.add.image(759, 477, "boiler", "bg"); + + // door + const door = this.add.image(591, 364, "boiler", "door"); + + // steam + const steam = this.add.sprite(262, 195, "boiler", "steam0001"); + + // archives_icon + const archives_icon = this.add.image(1428, 854, "boiler", "archives_icon"); + + // cab5 + this.add.image(940, 541, "boiler", "cab0001"); + + // cab4 + this.add.image(824, 542, "boiler", "cab0001"); + + // cab3 + this.add.image(943, 467, "boiler", "cab0001"); + + // cab2 + this.add.image(827, 467, "boiler", "cab0001"); + + // cab1 + this.add.image(946, 392, "boiler", "cab0001"); + + // cab + const cab = this.add.sprite(830, 392, "boiler", "cab0001"); + + // zone + const zone = this.add.rectangle(965.9, 1.1, 118, 536); + zone.setOrigin(0, 0); + zone.alpha = 0.5; + zone.isFilled = true; + zone.fillColor = 65280; + + // door (components) + const doorButton = new Button(door); + doorButton.spriteName = "door"; + doorButton.activeFrame = false; + doorButton.pixelPerfect = true; + const doorMoveTo = new MoveTo(door); + doorMoveTo.x = 600; + doorMoveTo.y = 554; + + // steam (components) + const steamAnimation = new Animation(steam); + steamAnimation.key = "steam"; + steamAnimation.end = 5; + + // archives_icon (components) + const archives_iconButton = new Button(archives_icon); + archives_iconButton.spriteName = "archives_icon"; + archives_iconButton.callback = () => this.onArchivesClick(); + archives_iconButton.activeFrame = false; + + // cab (components) + const cabSimpleButton = new SimpleButton(cab); + cabSimpleButton.hoverCallback = () => this.onCabOver(); + cabSimpleButton.hoverOutCallback = () => this.onCabOut(); + cabSimpleButton.callback = () => this.onArchivesClick(); + cabSimpleButton.pixelPerfect = true; + const cabShowHint = new ShowHint(cab); + cabShowHint.text = "archives_hint"; + + // zone (components) + new Zone(zone); + const zoneMoveTo = new MoveTo(zone); + zoneMoveTo.x = 1042; + zoneMoveTo.y = 560; + + this.archives_icon = archives_icon; + this.cab = cab; + + this.events.emit("scene-awake"); + } + + + /* START-USER-CODE */ + + create() { + super.create() + + this.archives_icon.depth = 1000 + } + + onCabOver() { + this.cab.play('boiler/cab_in') + } + + onCabOut() { + this.cab.play('boiler/cab_out') + } + + onArchivesClick() { + + } + + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ \ No newline at end of file diff --git a/src/scenes/rooms/boiler/Boiler.scene b/src/scenes/rooms/boiler/Boiler.scene new file mode 100644 index 00000000..3f004b8f --- /dev/null +++ b/src/scenes/rooms/boiler/Boiler.scene @@ -0,0 +1,189 @@ +{ + "id": "f9d36d51-b4ba-45b3-a655-e1e7aca07e44", + "sceneType": "SCENE", + "settings": { + "compilerInsertSpaces": true, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "autoImport": true, + "superClassName": "RoomScene", + "preloadMethodName": "_preload", + "preloadPackFiles": [ + "yukon/assets/media/rooms/boiler/boiler-pack.json" + ], + "createMethodName": "_create", + "sceneKey": "Boiler", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Image", + "id": "be5d229d-98c9-4f19-a8ee-8deedf9b312d", + "label": "bg", + "texture": { + "key": "boiler", + "frame": "bg" + }, + "x": 759, + "y": 477 + }, + { + "type": "Image", + "id": "1806224a-0b6b-43ba-8b28-7aa54ebe9421", + "label": "door", + "components": [ + "Button", + "MoveTo" + ], + "Button.spriteName": "door", + "Button.activeFrame": false, + "Button.pixelPerfect": true, + "MoveTo.x": "600", + "MoveTo.y": "554", + "texture": { + "key": "boiler", + "frame": "door" + }, + "x": 591, + "y": 364 + }, + { + "type": "Sprite", + "id": "889ba722-d1ee-44f2-87cc-4dd5b4e875d7", + "label": "steam", + "components": [ + "Animation" + ], + "Animation.key": "steam", + "Animation.end": 5, + "texture": { + "key": "boiler", + "frame": "steam0001" + }, + "x": 262, + "y": 195 + }, + { + "type": "Image", + "id": "d7519f96-3731-446c-a8dc-e6b74928fea5", + "label": "archives_icon", + "scope": "CLASS", + "components": [ + "Button" + ], + "Button.spriteName": "archives_icon", + "Button.callback": "() => this.onArchivesClick()", + "Button.activeFrame": false, + "texture": { + "key": "boiler", + "frame": "archives_icon" + }, + "x": 1428, + "y": 854 + }, + { + "type": "Image", + "id": "2e50c8bd-9841-45c9-9c94-6b757f1524a6", + "label": "cab5", + "texture": { + "key": "boiler", + "frame": "cab0001" + }, + "x": 940, + "y": 541 + }, + { + "type": "Image", + "id": "b8de99d6-f2f9-4c8f-9ec4-a0b8e9f2b8ce", + "label": "cab4", + "texture": { + "key": "boiler", + "frame": "cab0001" + }, + "x": 824, + "y": 542 + }, + { + "type": "Image", + "id": "9b73799a-590d-4c4e-8cf0-aa660862c2fd", + "label": "cab3", + "texture": { + "key": "boiler", + "frame": "cab0001" + }, + "x": 943, + "y": 467 + }, + { + "type": "Image", + "id": "f8e7f68b-c1c1-4330-9172-3752a5891e7f", + "label": "cab2", + "texture": { + "key": "boiler", + "frame": "cab0001" + }, + "x": 827, + "y": 467 + }, + { + "type": "Image", + "id": "85651cec-ceb5-49ae-9db8-af35a82d1932", + "label": "cab1", + "texture": { + "key": "boiler", + "frame": "cab0001" + }, + "x": 946, + "y": 392 + }, + { + "type": "Sprite", + "id": "73b9d376-0e87-46ac-8ca8-61ddc2f2a15c", + "label": "cab", + "scope": "CLASS", + "components": [ + "SimpleButton", + "ShowHint" + ], + "SimpleButton.hoverCallback": "() => this.onCabOver()", + "SimpleButton.hoverOutCallback": "() => this.onCabOut()", + "SimpleButton.callback": "() => this.onArchivesClick()", + "SimpleButton.pixelPerfect": true, + "ShowHint.text": "archives_hint", + "texture": { + "key": "boiler", + "frame": "cab0001" + }, + "x": 830, + "y": 392 + }, + { + "type": "Rectangle", + "id": "5c3b8994-023c-423a-ae5c-6796d6eb6155", + "label": "zone", + "components": [ + "Zone", + "MoveTo" + ], + "MoveTo.x": "1042", + "MoveTo.y": "560", + "x": 965.9, + "y": 1.1, + "originX": 0, + "originY": 0, + "alpha": 0.5, + "isFilled": true, + "fillColor": "#00ff00", + "width": 118, + "height": 536 + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 4 + } +} \ No newline at end of file diff --git a/src/scenes/rooms/cave/Cave.js b/src/scenes/rooms/cave/Cave.js index ede39bb6..6ecbbc65 100644 --- a/src/scenes/rooms/cave/Cave.js +++ b/src/scenes/rooms/cave/Cave.js @@ -17,7 +17,7 @@ export default class Cave extends RoomScene { /* START-USER-CTR-CODE */ this.roomTriggers = { - 'boiler': null, + 'boiler': () => this.triggerRoom(804, 624, 616), 'plaza': () => this.triggerRoom(300, 582, 588), 'mine': null } diff --git a/src/scenes/rooms/dance/Dance.js b/src/scenes/rooms/dance/Dance.js index b76bd2e2..815068d3 100644 --- a/src/scenes/rooms/dance/Dance.js +++ b/src/scenes/rooms/dance/Dance.js @@ -42,7 +42,7 @@ export default class Dance extends RoomScene { this.roomTriggers = { 'town': () => this.triggerRoom(100, 680, 520), - 'boiler': null, + 'boiler': () => this.triggerRoom(804, 1120, 640), 'lounge': () => this.triggerRoom(121, 1200, 760), 'mix': null } From 7a51b993bc153ba1d497780574c9b6cefeebb00b Mon Sep 17 00:00:00 2001 From: ChrisCPI <92183829+ChrisCPI@users.noreply.github.com> Date: Tue, 8 Oct 2024 17:17:01 -0400 Subject: [PATCH 11/15] Add Pizza ID to Agent screen click --- src/scenes/rooms/agent/Agent.js | 2 +- src/scenes/rooms/agent/Agent.scene | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scenes/rooms/agent/Agent.js b/src/scenes/rooms/agent/Agent.js index f5186882..c0a3aa63 100644 --- a/src/scenes/rooms/agent/Agent.js +++ b/src/scenes/rooms/agent/Agent.js @@ -362,7 +362,7 @@ export default class Agent extends RoomScene { // pizza (components) const pizzaZone = new Zone(pizza); - pizzaZone.callback = () =>{}; + pizzaZone.callback = () => this.onScreenClick(330); const pizzaShowHint = new ShowHint(pizza); pizzaShowHint.text = "pizza_hint"; diff --git a/src/scenes/rooms/agent/Agent.scene b/src/scenes/rooms/agent/Agent.scene index 5aac16aa..464a6a19 100644 --- a/src/scenes/rooms/agent/Agent.scene +++ b/src/scenes/rooms/agent/Agent.scene @@ -383,7 +383,7 @@ "Zone", "ShowHint" ], - "Zone.callback": "() =>{}", + "Zone.callback": "() => this.onScreenClick(330)", "ShowHint.text": "pizza_hint", "x": 1012.9752595163882, "y": 244.79914949461818, From 7942afa5eb96ce71a03bd8d0e5dc8b71409a93ae Mon Sep 17 00:00:00 2001 From: ChrisCPI <92183829+ChrisCPI@users.noreply.github.com> Date: Tue, 8 Oct 2024 20:11:38 -0400 Subject: [PATCH 12/15] Add Pizzatron to Pizza --- src/scenes/rooms/pizza/Pizza.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scenes/rooms/pizza/Pizza.js b/src/scenes/rooms/pizza/Pizza.js index 61653602..7236e800 100644 --- a/src/scenes/rooms/pizza/Pizza.js +++ b/src/scenes/rooms/pizza/Pizza.js @@ -26,7 +26,7 @@ export default class Pizza extends RoomScene { this.roomTriggers = { plaza: () => this.triggerRoom(300, 1110, 580), - pizzatron: null + pizzatron: () => this.triggerGame(910) } this.music = '20' From 72b9c0137cfb9f259275a4a09bbbcb2d461d6cf8 Mon Sep 17 00:00:00 2001 From: ChrisCPI <92183829+ChrisCPI@users.noreply.github.com> Date: Tue, 8 Oct 2024 20:12:01 -0400 Subject: [PATCH 13/15] Open adopt catalog on adopt trigger in Pet --- src/scenes/rooms/pet/Pet.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scenes/rooms/pet/Pet.js b/src/scenes/rooms/pet/Pet.js index 539603fa..bda37e9b 100644 --- a/src/scenes/rooms/pet/Pet.js +++ b/src/scenes/rooms/pet/Pet.js @@ -42,7 +42,7 @@ export default class Pet extends RoomScene { this.roomTriggers = { 'plaza': () => this.triggerRoom(300, 384, 620), - 'adopt': null, + 'adopt': () => this.onAdoptCatalogClick(), 'roundup': () => this.triggerGame(902), } From ca00c758924a9099b664cdc6a37dda928899641f Mon Sep 17 00:00:00 2001 From: ChrisCPI <92183829+ChrisCPI@users.noreply.github.com> Date: Tue, 8 Oct 2024 20:20:49 -0400 Subject: [PATCH 14/15] Fix sorting on chairs in Pizza --- src/scenes/rooms/pizza/Pizza.js | 2 +- src/scenes/rooms/pizza/Pizza.scene | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/scenes/rooms/pizza/Pizza.js b/src/scenes/rooms/pizza/Pizza.js index 7236e800..140cd7f8 100644 --- a/src/scenes/rooms/pizza/Pizza.js +++ b/src/scenes/rooms/pizza/Pizza.js @@ -173,7 +173,7 @@ export default class Pizza extends RoomScene { fg.setOrigin(0, 1); // lists - const sort = [pan, fg, piano, chair2, oven, fire, deskContainer, table1Container, table2Container, table3Container, chair4, chair3]; + const sort = [pan, fg, piano, oven, fire, deskContainer, table1Container, table2Container, table3Container, chair6, chair5, chair4, chair3, chair2, chair1]; // door (components) const doorButton = new Button(door); diff --git a/src/scenes/rooms/pizza/Pizza.scene b/src/scenes/rooms/pizza/Pizza.scene index 9c1a09a7..eb7fa418 100644 --- a/src/scenes/rooms/pizza/Pizza.scene +++ b/src/scenes/rooms/pizza/Pizza.scene @@ -450,15 +450,18 @@ "ee039270-f45b-4d74-9361-66d08f491e6f", "0a944c35-024c-4b78-9a5c-b6530b9f6d68", "c5cce81e-95b5-4de9-ba98-0543e06ea197", - "0d93246a-01b5-4587-9cbf-1038c14f2329", "dbf9378e-5df0-4b5f-8b1c-bd0b381b9ffa", "c57b28bc-8326-4ddf-9275-033cbef67db0", "dad75c12-55e6-4d71-9cb3-fe2b945ff07a", "dd3f8d36-ac11-414a-866c-c4c47129edef", "51589c43-c190-4139-bc89-4e135cbde652", "4c858d4f-ca61-4bb5-b747-a53b66c4f8c5", + "47f19e87-e750-4e56-8c11-14c0c1992335", + "d7acab73-a7dc-4902-983d-14a8afa03b5d", "81f8464c-e2c3-484c-a2f8-24db224e78e4", - "3efbc3b2-68c2-45a6-a9cd-6a9d1fad2f06" + "3efbc3b2-68c2-45a6-a9cd-6a9d1fad2f06", + "0d93246a-01b5-4587-9cbf-1038c14f2329", + "a6178809-b14c-414f-a66f-f88fde977c57" ] } ] From 342ed3900401c3c1f3af831f636decdf44710db2 Mon Sep 17 00:00:00 2001 From: ChrisCPI <92183829+ChrisCPI@users.noreply.github.com> Date: Tue, 8 Oct 2024 21:49:09 -0400 Subject: [PATCH 15/15] Support for default cursor on Zone and SimpleButton --- src/scenes/components/SimpleButton.js | 4 +++- src/scenes/components/Zone.js | 4 +++- src/scenes/components/components.components | 24 +++++++++++++++++-- src/scenes/rooms/dance/Dance.js | 1 + src/scenes/rooms/dance/Dance.scene | 26 ++------------------- src/scenes/rooms/lounge/Lounge.js | 6 +++++ src/scenes/rooms/lounge/Lounge.scene | 17 ++++++-------- src/scenes/rooms/pet/Pet.js | 5 ++++ src/scenes/rooms/pet/Pet.scene | 5 ++++ 9 files changed, 54 insertions(+), 38 deletions(-) diff --git a/src/scenes/components/SimpleButton.js b/src/scenes/components/SimpleButton.js index dc0b051b..11f9db01 100644 --- a/src/scenes/components/SimpleButton.js +++ b/src/scenes/components/SimpleButton.js @@ -21,6 +21,8 @@ export default class SimpleButton extends EventComponent { this.callback = () => {}; /** @type {boolean} */ this.pixelPerfect = false; + /** @type {boolean} */ + this.handCursor = true; this.gameObject = gameObject; @@ -57,7 +59,7 @@ export default class SimpleButton extends EventComponent { } this.gameObject.setInteractive({ - cursor: 'pointer', + cursor: this.handCursor ? 'pointer' : 'default', pixelPerfect: this.pixelPerfect }) } diff --git a/src/scenes/components/Zone.js b/src/scenes/components/Zone.js index 371ac683..f0cf740e 100644 --- a/src/scenes/components/Zone.js +++ b/src/scenes/components/Zone.js @@ -19,6 +19,8 @@ export default class Zone extends SimpleButton { this.hoverOutCallback = null; /** @type {any} */ this.callback = () => {}; + /** @type {boolean} */ + this.handCursor = true; this.gameObject = gameObject; @@ -51,7 +53,7 @@ export default class Zone extends SimpleButton { zone.setOrigin(this.gameObject.originX, this.gameObject.originY) zone.setInteractive({ - cursor: 'pointer' + cursor: this.handCursor ? 'pointer' : 'default' }) zone.on('pointerover', () => this.onOver()) diff --git a/src/scenes/components/components.components b/src/scenes/components/components.components index f6e57533..808ef5f7 100644 --- a/src/scenes/components/components.components +++ b/src/scenes/components/components.components @@ -234,6 +234,16 @@ "type": { "id": "boolean" } + }, + { + "name": "handCursor", + "label": "Hand Cursor", + "tooltip": "Hand Cursor", + "defValue": true, + "customDefinition": false, + "type": { + "id": "boolean" + } } ] }, @@ -377,14 +387,24 @@ "id": "expression", "expressionType": "any" } + }, + { + "name": "handCursor", + "label": "Hand Cursor", + "tooltip": "Hand Cursor", + "defValue": true, + "customDefinition": false, + "type": { + "id": "boolean" + } } ] } ], "meta": { - "app": "Phaser Editor 2D - Object Script Editor", + "app": "Phaser Editor 2D - User Components Editor", "url": "https://phasereditor2d.com", - "contentType": "phasereditor2d.core.scene.SceneContentType" + "contentType": "phasereditor2d.core.scene.UserComponents" }, "javaScriptInitFieldsInConstructor": true, "insertSpaces": true, diff --git a/src/scenes/rooms/dance/Dance.js b/src/scenes/rooms/dance/Dance.js index 815068d3..48ecdb7f 100644 --- a/src/scenes/rooms/dance/Dance.js +++ b/src/scenes/rooms/dance/Dance.js @@ -379,6 +379,7 @@ export default class Dance extends RoomScene { // zone (components) const zoneZone = new Zone(zone); zoneZone.hoverCallback = () => this.onPuffleOver(); + zoneZone.handCursor = false; this.puffle = puffle; this.dj_speaker_sound = dj_speaker_sound; diff --git a/src/scenes/rooms/dance/Dance.scene b/src/scenes/rooms/dance/Dance.scene index 536fdeaf..0e62abfc 100644 --- a/src/scenes/rooms/dance/Dance.scene +++ b/src/scenes/rooms/dance/Dance.scene @@ -20,7 +20,6 @@ "type": "Image", "id": "827705b8-e5f0-4b55-a123-ebd0b4c793bf", "label": "bg", - "components": [], "texture": { "key": "dance", "frame": "bg" @@ -32,7 +31,6 @@ "type": "Image", "id": "1535c362-53c6-4419-90b1-7ae94c5eb1bf", "label": "wire", - "components": [], "texture": { "key": "dance", "frame": "wire" @@ -45,7 +43,6 @@ "type": "Image", "id": "697cf3b5-7ce2-428e-af72-686676a152f5", "label": "floor_frame", - "components": [], "texture": { "key": "dance", "frame": "floor/frame" @@ -74,7 +71,6 @@ "type": "Image", "id": "5b00960f-fbed-4eb1-9360-497cb991b12e", "label": "stage", - "components": [], "texture": { "key": "dance", "frame": "stage" @@ -88,7 +84,6 @@ "type": "Image", "id": "adfa27af-cd92-4b74-8b62-31b2ae1aa1c2", "label": "fg_wire", - "components": [], "texture": { "key": "dance", "frame": "fg/fg_wire" @@ -136,7 +131,6 @@ "type": "Image", "id": "33ef0225-8757-4bcb-b044-b4f46779abf9", "label": "fg_wire_1", - "components": [], "texture": { "key": "dance", "frame": "fg/fg_wire" @@ -168,7 +162,6 @@ "type": "Image", "id": "5afcee12-4520-4be3-ba1c-f7ff61ee1643", "label": "speaker_3", - "components": [], "texture": { "key": "dance", "frame": "speaker_3" @@ -219,7 +212,6 @@ "type": "Image", "id": "126a798d-0fca-48e8-97be-556d2535adb7", "label": "lamp", - "components": [], "texture": { "key": "dance", "frame": "lamp" @@ -232,7 +224,6 @@ "type": "Image", "id": "b506480b-8171-4d98-b6d0-e060959d1bec", "label": "door_behind", - "components": [], "texture": { "key": "dance", "frame": "door/behind" @@ -268,7 +259,6 @@ "type": "Image", "id": "072a9d40-7f36-4292-a10f-448da1e80d9e", "label": "door_frame", - "components": [], "texture": { "key": "dance", "frame": "door/frame" @@ -318,7 +308,6 @@ "type": "Container", "id": "4dfc59f6-228a-404e-9295-f232e65fb617", "label": "puffle_speaker", - "components": [], "x": 1164, "y": 735.5295257801258, "list": [ @@ -326,7 +315,6 @@ "type": "Image", "id": "6c4cba5d-d47d-4d86-be9f-c3bc2c1f43c5", "label": "speaker_4", - "components": [], "texture": { "key": "dance", "frame": "speaker_4" @@ -341,7 +329,6 @@ "id": "0533211a-1c41-4299-9067-7b5f97c80689", "label": "puffle", "scope": "CLASS", - "components": [], "texture": { "key": "dance", "frame": "puffle/puffle0001" @@ -355,7 +342,6 @@ "type": "Container", "id": "595b30dd-eb9e-42d4-91f7-d53fcd6f87c6", "label": "boiler", - "components": [], "x": 979.3584381110322, "y": 418.96573398979467, "list": [ @@ -405,7 +391,6 @@ "type": "Container", "id": "43e90a8b-ac6b-457f-bed7-77da9a82d963", "label": "dj_speaker", - "components": [], "x": 790.7929422877853, "y": 305.10866987575673, "list": [ @@ -413,7 +398,6 @@ "type": "Image", "id": "50acead0-a33b-4ba0-830c-bad87b5abac2", "label": "dj_speaker_speaker", - "components": [], "texture": { "key": "dance", "frame": "dj/speaker" @@ -449,7 +433,6 @@ "type": "Container", "id": "fddb63fc-c183-495a-8d07-76dae057349c", "label": "mixer", - "components": [], "x": 656.758588457557, "y": 340.0371580227643, "list": [ @@ -457,7 +440,6 @@ "type": "Image", "id": "6ab927ea-c842-4262-bd7d-6e00f23edbe1", "label": "dj_mixer_wave_green", - "components": [], "texture": { "key": "dance", "frame": "dj/mixer/wave/green" @@ -469,7 +451,6 @@ "id": "c6273a95-4066-47c3-b0a1-69dee637628e", "label": "dj_mixer_wave", "scope": "CLASS", - "components": [], "texture": { "key": "dance", "frame": "dj/mixer/wave/wave0001" @@ -480,7 +461,6 @@ "type": "Image", "id": "0795ef57-6abb-45b2-af8a-418015d03a82", "label": "dj_mixer", - "components": [], "texture": { "key": "dance", "frame": "dj/mixer/mixer" @@ -567,7 +547,6 @@ "type": "Image", "id": "d5c83a2b-816d-4200-b174-4916e432af49", "label": "dj_wires", - "components": [], "texture": { "key": "dance", "frame": "dj/wires" @@ -583,7 +562,6 @@ "type": "Container", "id": "2e01dc76-ddeb-4860-8a94-ded19a24c254", "label": "box", - "components": [], "x": 520.6001395292443, "y": 310.6122881275866, "list": [ @@ -631,7 +609,6 @@ "id": "e51b9d3e-302a-4fad-8d41-4bdda94ee5f9", "label": "dj_box_sliders", "scope": "CLASS", - "components": [], "texture": { "key": "dance", "frame": "dj/box/sliders/sliders0001" @@ -688,6 +665,7 @@ "Zone" ], "Zone.hoverCallback": "() => this.onPuffleOver()", + "Zone.handCursor": false, "x": 1164, "y": 537, "alpha": 0.5, @@ -702,7 +680,7 @@ "app": "Phaser Editor 2D - Scene Editor", "url": "https://phasereditor2d.com", "contentType": "phasereditor2d.core.scene.SceneContentType", - "version": 3 + "version": 4 }, "lists": [ { diff --git a/src/scenes/rooms/lounge/Lounge.js b/src/scenes/rooms/lounge/Lounge.js index 36144d42..0dd8b78c 100644 --- a/src/scenes/rooms/lounge/Lounge.js +++ b/src/scenes/rooms/lounge/Lounge.js @@ -133,36 +133,42 @@ export default class Lounge extends RoomScene { // chair_1 (components) const chair_1SimpleButton = new SimpleButton(chair_1); chair_1SimpleButton.pixelPerfect = true; + chair_1SimpleButton.handCursor = false; const chair_1MoveTo = new MoveTo(chair_1); chair_1MoveTo.y = 488; // chair_2 (components) const chair_2SimpleButton = new SimpleButton(chair_2); chair_2SimpleButton.pixelPerfect = true; + chair_2SimpleButton.handCursor = false; const chair_2MoveTo = new MoveTo(chair_2); chair_2MoveTo.y = 466; // chair_1_1 (components) const chair_1_1SimpleButton = new SimpleButton(chair_1_1); chair_1_1SimpleButton.pixelPerfect = true; + chair_1_1SimpleButton.handCursor = false; const chair_1_1MoveTo = new MoveTo(chair_1_1); chair_1_1MoveTo.y = 690; // chair_2_1 (components) const chair_2_1SimpleButton = new SimpleButton(chair_2_1); chair_2_1SimpleButton.pixelPerfect = true; + chair_2_1SimpleButton.handCursor = false; const chair_2_1MoveTo = new MoveTo(chair_2_1); chair_2_1MoveTo.y = 667; // chair_1_2 (components) const chair_1_2SimpleButton = new SimpleButton(chair_1_2); chair_1_2SimpleButton.pixelPerfect = true; + chair_1_2SimpleButton.handCursor = false; const chair_1_2MoveTo = new MoveTo(chair_1_2); chair_1_2MoveTo.y = 728; // chair_1_3 (components) const chair_1_3SimpleButton = new SimpleButton(chair_1_3); chair_1_3SimpleButton.pixelPerfect = true; + chair_1_3SimpleButton.handCursor = false; const chair_1_3MoveTo = new MoveTo(chair_1_3); chair_1_3MoveTo.y = 739; diff --git a/src/scenes/rooms/lounge/Lounge.scene b/src/scenes/rooms/lounge/Lounge.scene index 8397e6df..e294a894 100644 --- a/src/scenes/rooms/lounge/Lounge.scene +++ b/src/scenes/rooms/lounge/Lounge.scene @@ -20,7 +20,6 @@ "type": "Image", "id": "c9d8a072-5746-43ad-99db-a0707d77be3a", "label": "bg", - "components": [], "texture": { "key": "lounge", "frame": "bg" @@ -80,7 +79,6 @@ "type": "Image", "id": "da775854-13dc-41bc-8d75-dc350847eb90", "label": "plant", - "components": [], "texture": { "key": "lounge", "frame": "plant" @@ -99,6 +97,7 @@ "MoveTo" ], "SimpleButton.pixelPerfect": true, + "SimpleButton.handCursor": false, "MoveTo.y": 488, "texture": { "key": "lounge", @@ -118,6 +117,7 @@ "MoveTo" ], "SimpleButton.pixelPerfect": true, + "SimpleButton.handCursor": false, "MoveTo.y": 466, "texture": { "key": "lounge", @@ -132,7 +132,6 @@ "type": "Image", "id": "bff848fe-51ca-467e-a12d-e16ebee675e5", "label": "table_1", - "components": [], "texture": { "key": "lounge", "frame": "table_1" @@ -150,6 +149,7 @@ "MoveTo" ], "SimpleButton.pixelPerfect": true, + "SimpleButton.handCursor": false, "MoveTo.y": 690, "texture": { "key": "lounge", @@ -169,6 +169,7 @@ "MoveTo" ], "SimpleButton.pixelPerfect": true, + "SimpleButton.handCursor": false, "MoveTo.y": 667, "texture": { "key": "lounge", @@ -183,7 +184,6 @@ "type": "Image", "id": "e9b341be-b019-4c84-95b3-59a1d2c8277d", "label": "table_2", - "components": [], "texture": { "key": "lounge", "frame": "table_2" @@ -202,6 +202,7 @@ "MoveTo" ], "SimpleButton.pixelPerfect": true, + "SimpleButton.handCursor": false, "MoveTo.y": 728, "texture": { "key": "lounge", @@ -221,6 +222,7 @@ "MoveTo" ], "SimpleButton.pixelPerfect": true, + "SimpleButton.handCursor": false, "MoveTo.y": 739, "texture": { "key": "lounge", @@ -236,7 +238,6 @@ "type": "Image", "id": "3494e81b-643b-4756-927a-23d08ea4f2ff", "label": "table_3", - "components": [], "texture": { "key": "lounge", "frame": "table_3" @@ -250,7 +251,6 @@ "type": "Image", "id": "71108d45-7bfb-4447-bd20-66a33691e012", "label": "rail_2", - "components": [], "texture": { "key": "lounge", "frame": "rail_2" @@ -263,7 +263,6 @@ "type": "Image", "id": "5d9a6895-145f-4097-b222-3c834ae23e32", "label": "rail_3", - "components": [], "texture": { "key": "lounge", "frame": "rail_3" @@ -276,7 +275,6 @@ "type": "Image", "id": "7f2a52f5-cc21-422d-8d37-dab1fb490290", "label": "rail_4", - "components": [], "texture": { "key": "lounge", "frame": "rail_4" @@ -289,7 +287,6 @@ "type": "Image", "id": "0f779640-c5cb-4432-a51d-6fdff91bba81", "label": "rail_1", - "components": [], "texture": { "key": "lounge", "frame": "rail_1" @@ -305,7 +302,7 @@ "app": "Phaser Editor 2D - Scene Editor", "url": "https://phasereditor2d.com", "contentType": "phasereditor2d.core.scene.SceneContentType", - "version": 3 + "version": 4 }, "lists": [ { diff --git a/src/scenes/rooms/pet/Pet.js b/src/scenes/rooms/pet/Pet.js index bda37e9b..7cf21239 100644 --- a/src/scenes/rooms/pet/Pet.js +++ b/src/scenes/rooms/pet/Pet.js @@ -194,6 +194,7 @@ export default class Pet extends RoomScene { // os (components) const osSimpleButton = new SimpleButton(os); osSimpleButton.pixelPerfect = true; + osSimpleButton.handCursor = false; const osAnimation = new Animation(os); osAnimation.key = "os/os"; osAnimation.end = 74; @@ -228,6 +229,7 @@ export default class Pet extends RoomScene { // red (components) const redSimpleButton = new SimpleButton(red); redSimpleButton.hoverCallback = () => this.onRedOver(); + redSimpleButton.handCursor = false; // yellow (components) const yellowAnimation = new Animation(yellow); @@ -269,6 +271,7 @@ export default class Pet extends RoomScene { const penSimpleButton = new SimpleButton(pen); penSimpleButton.hoverCallback = () => this.onPenOver(); penSimpleButton.hoverOutCallback = () => this.onPenOut(); + penSimpleButton.handCursor = false; const penMoveTo = new MoveTo(pen); penMoveTo.x = 590; penMoveTo.y = 490; @@ -277,6 +280,7 @@ export default class Pet extends RoomScene { const fishSimpleButton = new SimpleButton(fish); fishSimpleButton.hoverCallback = () => this.onFishOver(); fishSimpleButton.pixelPerfect = true; + fishSimpleButton.handCursor = false; const fishAnimation = new Animation(fish); fishAnimation.key = "fish/fish"; fishAnimation.start = 2; @@ -302,6 +306,7 @@ export default class Pet extends RoomScene { // blackZone (components) const blackZoneZone = new Zone(blackZone); blackZoneZone.hoverCallback = () => this.onBlackOver(); + blackZoneZone.handCursor = false; // adoptCatalog (components) const adoptCatalogButton = new Button(adoptCatalog); diff --git a/src/scenes/rooms/pet/Pet.scene b/src/scenes/rooms/pet/Pet.scene index 30ac4507..5aa5daa6 100644 --- a/src/scenes/rooms/pet/Pet.scene +++ b/src/scenes/rooms/pet/Pet.scene @@ -92,6 +92,7 @@ "Animation" ], "SimpleButton.pixelPerfect": true, + "SimpleButton.handCursor": false, "Animation.key": "os/os", "Animation.end": 74, "Animation.repeat": 0, @@ -193,6 +194,7 @@ "SimpleButton" ], "SimpleButton.hoverCallback": "() => this.onRedOver()", + "SimpleButton.handCursor": false, "texture": { "key": "pet", "frame": "red/red0001" @@ -341,6 +343,7 @@ ], "SimpleButton.hoverCallback": "() => this.onPenOver()", "SimpleButton.hoverOutCallback": "() => this.onPenOut()", + "SimpleButton.handCursor": false, "MoveTo.x": 590, "MoveTo.y": 490, "texture": { @@ -363,6 +366,7 @@ ], "SimpleButton.hoverCallback": "() => this.onFishOver()", "SimpleButton.pixelPerfect": true, + "SimpleButton.handCursor": false, "Animation.key": "fish/fish", "Animation.start": 2, "Animation.end": 32, @@ -504,6 +508,7 @@ "Zone" ], "Zone.hoverCallback": "() => this.onBlackOver()", + "Zone.handCursor": false, "x": 92, "y": 356, "alpha": 0.5,