Skip to content

Commit

Permalink
added phaser halloween games
Browse files Browse the repository at this point in the history
Signed-off-by: Scott Westover <[email protected]>
  • Loading branch information
scottwestover committed Oct 15, 2024
1 parent 3a97a61 commit 7aff00c
Show file tree
Hide file tree
Showing 111 changed files with 6,271 additions and 0 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"section1": {
"files": [
{
"url": [
"assets/3-Midnight-Candy-Chase-loop.mp3"
],
"type": "audio",
"key": "3-Midnight-Candy-Chase-loop"
},
{
"url": "assets/text/clickToPlay.png",
"type": "image",
"key": "clickToPlay"
},
{
"url": "assets/text/clickToPlayAgain.png",
"type": "image",
"key": "clickToPlayAgain"
},
{
"url": "assets/dino.png",
"key": "dino",
"type": "image"
},
{
"url": "assets/fF5IT3.png",
"type": "image",
"key": "fF5IT3"
},
{
"url": "assets/text/nice.png",
"type": "image",
"key": "nice"
},
{
"atlasURL": "assets/spritesheet.json",
"textureURL": "assets/spritesheet.png",
"type": "atlas",
"key": "spritesheet"
},
{
"url": "assets/text/title.png",
"type": "image",
"key": "title"
}
]
},
"meta": {
"app": "Phaser Editor 2D - Asset Pack Editor",
"contentType": "phasereditor2d.pack.core.AssetContentType",
"url": "https://phasereditor2d.com",
"version": 2,
"showAllFilesInBlocks": false
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"section1": {
"files": [
{
"url": "assets/guapen.png",
"type": "image",
"key": "guapen"
}
]
},
"meta": {
"app": "Phaser Editor 2D - Asset Pack Editor",
"contentType": "phasereditor2d.pack.core.AssetContentType",
"url": "https://phasereditor2d.com",
"version": 2,
"showAllFilesInBlocks": false
}
}
155 changes: 155 additions & 0 deletions hugo-site/static/games/halloween-memory-match/assets/spritesheet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
{
"frames": {
"Bat.png": {
"frame": {
"x": 1,
"y": 1,
"w": 144,
"h": 144
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 144,
"h": 144
},
"sourceSize": {
"w": 144,
"h": 144
}
},
"Cadle.png": {
"frame": {
"x": 147,
"y": 1,
"w": 144,
"h": 144
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 144,
"h": 144
},
"sourceSize": {
"w": 144,
"h": 144
}
},
"Candy.png": {
"frame": {
"x": 1,
"y": 147,
"w": 144,
"h": 144
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 144,
"h": 144
},
"sourceSize": {
"w": 144,
"h": 144
}
},
"Cat.png": {
"frame": {
"x": 147,
"y": 147,
"w": 144,
"h": 144
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 144,
"h": 144
},
"sourceSize": {
"w": 144,
"h": 144
}
},
"Pumpkin.png": {
"frame": {
"x": 293,
"y": 1,
"w": 144,
"h": 144
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 144,
"h": 144
},
"sourceSize": {
"w": 144,
"h": 144
}
},
"Skull.png": {
"frame": {
"x": 293,
"y": 147,
"w": 144,
"h": 144
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 144,
"h": 144
},
"sourceSize": {
"w": 144,
"h": 144
}
},
"Verse.png": {
"frame": {
"x": 1,
"y": 293,
"w": 144,
"h": 144
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 144,
"h": 144
},
"sourceSize": {
"w": 144,
"h": 144
}
}
},
"meta": {
"app": "http://www.codeandweb.com/texturepacker",
"version": "1.0",
"image": "spritesheet.png",
"format": "RGBA8888",
"size": {
"w": 438,
"h": 438
},
"scale": "1"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions hugo-site/static/games/halloween-memory-match/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">

<title>My Game</title>

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/phaser.min.js"></script>
<script src="src/main.js" type="module"></script>

<style>
body {
background: #2f2f2f;
margin: 0;
padding: 0;
}
</style>

</head>

<body>
</body>

</html>

Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// You can write more code here
/* END-USER-IMPORTS */
export default class ActionTargetComp {
constructor(gameObject) {
this.gameObject = gameObject;
gameObject["__ActionTargetComp"] = this;
/* START-USER-CTR-CODE */
// Write your code here.
/* END-USER-CTR-CODE */
}
static getComponent(gameObject) {
return gameObject["__ActionTargetComp"];
}
gameObject;
target = "GAME_OBJECT";
targetName = "";
/* START-USER-CODE */
static getTargetGameObject(scriptNode, args) {
const comp = ActionTargetComp.getComponent(scriptNode);
if (comp) {
switch (comp.target) {
case "GAME_OBJECT":
return scriptNode.gameObject;
case "ARG_1":
return args[0];
case "ARG_2":
return args[1];
case "ARG_3":
return args[2];
case "ARG_4":
return args[3];
case "ARG_5":
return args[4];
case "ARG_6":
return args[5];
case "ARG_7":
return args[6];
case "ARG_8":
return args[7];
}
}
return scriptNode.gameObject;
}
}
/* END OF COMPILED CODE */
// You can write more code here
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"components": [
{
"name": "ActionTargetComp",
"displayName": "Action Target Config",
"objectDisplayFormat": "",
"baseClass": "",
"gameObjectType": "any",
"properties": [
{
"name": "target",
"label": "Target",
"tooltip": "The target object of the action.",
"defValue": "GAME_OBJECT",
"customDefinition": false,
"type": {
"id": "option",
"options": [
"GAME_OBJECT",
"ARG_1",
"ARG_2",
"ARG_3",
"ARG_4",
"ARG_5",
"ARG_6",
"ARG_7",
"ARG_8"
]
}
},
{
"name": "targetName",
"label": "Target Name",
"tooltip": "A display name for the target.",
"defValue": "",
"customDefinition": false,
"type": {
"id": "string"
}
}
]
}
],
"meta": {
"app": "Phaser Editor 2D - User Components Editor",
"url": "https://phasereditor2d.com",
"contentType": "phasereditor2d.core.scene.UserComponents"
},
"outputLang": "TYPE_SCRIPT",
"exportClass": true,
"autoImport": true
}
Loading

0 comments on commit 7aff00c

Please sign in to comment.