Skip to content

Commit

Permalink
Merge branch 'main' into feature/add-mage-object-hose-1
Browse files Browse the repository at this point in the history
  • Loading branch information
poschuler authored Oct 11, 2024
2 parents 839ba56 + db79ea6 commit 0f16506
Show file tree
Hide file tree
Showing 23 changed files with 346 additions and 495 deletions.
153 changes: 7 additions & 146 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "project",
"homepage": "https://zero-to-mastery.github.io/ZTM-Quest",
"private": true,
"version": "1.0.0",
"version": "0.4.0",
"type": "module",
"scripts": {
"dev": "vite",
Expand All @@ -19,9 +19,9 @@
"globals": "^15.9.0",
"prettier": "^3.3.3",
"terser": "^5.32.0",
"vite": "^5.4.1"
"vite": "^5.4.8"
},
"dependencies": {
"kaplay": "^3001.0.0-beta.1"
"kaplay": "^3001.0.0-beta.2"
}
}
23 changes: 17 additions & 6 deletions public/maps/map_arcade.json
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@
"name":"map_sprites",
"opacity":1,
"type":"group",
"visible":false,
"visible":true,
"x":0,
"y":0
},
Expand Down Expand Up @@ -1297,13 +1297,13 @@
{
"height":13.5,
"id":105,
"name":"game_machine_12",
"name":"game_machine_13",
"rotation":0,
"type":"",
"visible":true,
"width":10.5,
"x":106.916666666667,
"y":163.25
"x":105.916666666667,
"y":117.5
},
{
"height":6.75,
Expand Down Expand Up @@ -1382,6 +1382,17 @@
"width":21.2727272727273,
"x":253.212121212121,
"y":272.727272727273
},
{
"height":13.5,
"id":114,
"name":"game_machine_12",
"rotation":0,
"type":"",
"visible":true,
"width":10.5,
"x":109,
"y":162.75
}],
"opacity":1,
"properties":[
Expand All @@ -1391,7 +1402,7 @@
"value":true
}],
"type":"objectgroup",
"visible":false,
"visible":true,
"x":0,
"y":0
},
Expand Down Expand Up @@ -1437,7 +1448,7 @@
"y":0
}],
"nextlayerid":24,
"nextobjectid":114,
"nextobjectid":115,
"orientation":"orthogonal",
"renderorder":"right-down",
"tiledversion":"1.11.0",
Expand Down
2 changes: 1 addition & 1 deletion src/gameObjects/map_arcade/npcsOnmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const npcsInArcadeMap = (k, map, spawnpoints) => {
direction: 'idle-up',
},
{
patterns: [/painting_/],
patterns: [/painting_near_game_machine_10/],
adjustments: { xAdjust: 35, yAdjust: 25 },
direction: 'idle-up',
},
Expand Down
6 changes: 3 additions & 3 deletions src/gameObjects/map_campus_house_1/computer.gameObject.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ export const computer = (k, map, spawnpoints) => {
k.sprite('computer', { frame: 4 }),
k.area(),
k.pos(
(tableWidth + diningRoomTable.pos.x - 20),
(tableHeight + diningRoomTable.pos.y - 20)
tableWidth + diningRoomTable.pos.x - 20,
tableHeight + diningRoomTable.pos.y - 20
),
k.body({ isStatic: true }),
k.scale(scaleFactor - 0.7),
k.scale(scaleFactor * 0.4),
k.offscreen({ hide: true, distance: 10 }),
'computer',
]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,73 +165,7 @@ function startNumberGuessingGame(k) {

k.go('numberGuessing');
}

function injectCSS() {
const style = document.createElement('style');
style.innerHTML = `
#custom-prompt {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background-color: rgba(0, 0, 0, 0.6);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
}
#prompt-message {
font-size: 1.5rem;
color: white;
text-align: center;
margin-bottom: 20px;
}
#options-container {
display: flex;
justify-content: center;
gap: 10px;
}
.option-btn {
padding: 10px 20px;
background-color: #007BFF;
color: white;
border: none;
border-radius: 5px;
font-size: 1.2rem;
cursor: pointer;
transition: background-color 0.3s ease;
}
.option-btn:hover {
background-color: #0056b3;
}
.option-btn:focus {
outline: none;
box-shadow: 0 0 5px 2px rgba(0, 123, 255, 0.8);
}
@media (max-width: 600px) {
#options-container {
flex-direction: column;
}
.option-btn {
width: 100%;
text-align: center;
}
}
`;
document.head.appendChild(style);
}

function showCustomPrompt(message, options, callback) {
injectCSS(); // Inject the CSS styles
document.getElementById('prompt-message').textContent = message;
const optionsContainer = document.getElementById('options-container');
optionsContainer.innerHTML = '';
Expand Down
Loading

0 comments on commit 0f16506

Please sign in to comment.