Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New rooms, and other misc. changes/improvements #25

Open
wants to merge 21 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions assets/styles/fonts.css
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion src/data/fonts.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
],
Expand Down
12 changes: 12 additions & 0 deletions src/data/rooms.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -119,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,
Expand Down
2 changes: 2 additions & 0 deletions src/data/widgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ 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'),
'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'),
Expand Down
4 changes: 3 additions & 1 deletion src/scenes/components/SimpleButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -57,7 +59,7 @@ export default class SimpleButton extends EventComponent {
}

this.gameObject.setInteractive({
cursor: 'pointer',
cursor: this.handCursor ? 'pointer' : 'default',
pixelPerfect: this.pixelPerfect
})
}
Expand Down
4 changes: 3 additions & 1 deletion src/scenes/components/Zone.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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())
Expand Down
24 changes: 22 additions & 2 deletions src/scenes/components/components.components
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,16 @@
"type": {
"id": "boolean"
}
},
{
"name": "handCursor",
"label": "Hand Cursor",
"tooltip": "Hand Cursor",
"defValue": true,
"customDefinition": false,
"type": {
"id": "boolean"
}
}
]
},
Expand Down Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions src/scenes/games/card/CardJitsu.js
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
6 changes: 4 additions & 2 deletions src/scenes/interface/books/BookContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
68 changes: 68 additions & 0 deletions src/scenes/interface/game/clock_tower/ClockTower.js
Original file line number Diff line number Diff line change
@@ -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 */
121 changes: 121 additions & 0 deletions src/scenes/interface/game/clock_tower/ClockTower.scene
Original file line number Diff line number Diff line change
@@ -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
}
}
Loading