Skip to content

Commit

Permalink
Merge pull request #127 from VCGithubCode/fernando_branch
Browse files Browse the repository at this point in the history
Fernando branch
  • Loading branch information
VCGithubCode authored Aug 19, 2024
2 parents d57de33 + 804e9ab commit b425852
Show file tree
Hide file tree
Showing 10 changed files with 555 additions and 1,247 deletions.
1 change: 1 addition & 0 deletions assets/css/game.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@

body, html {
overflow: auto !important;
background-color: #049cd8;
}

2 changes: 1 addition & 1 deletion assets/css/memory.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ body {

body, html {
overflow: auto !important;
background-color: #049cd8;
}

button {
font-family: "Reddit Mono";
}
Expand Down
2 changes: 1 addition & 1 deletion assets/js/loaders.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function loadJSON(url) {
}

export function loadSpriteSheet(name) {
return loadJSON(`/sprites/${name}.json`)
return loadJSON(`./sprites/${name}.json`)
.then(sheetSpec => Promise.all([
sheetSpec,
loadImage(sheetSpec.imageURL),
Expand Down
2 changes: 1 addition & 1 deletion assets/js/loaders/audio.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {loadJSON} from '../loaders.js';

export function loadAudioBoard(name, audioContext) {
const loadAudio = createAudioLoader(audioContext);
return loadJSON(`/sounds/${name}.json`)
return loadJSON(`./sounds/${name}.json`)
.then(audioSheet => {
const audioBoard = new AudioBoard();
const fx = audioSheet.fx;
Expand Down
2 changes: 1 addition & 1 deletion assets/js/loaders/level.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function setupEntities(levelSpec, level, entityFactory) {

export function createLevelLoader(entityFactory) {
return function loadLevel(name) {
return loadJSON(`/levels/${name}.json`)
return loadJSON(`./levels/${name}.json`)
.then(levelSpec => Promise.all([
levelSpec,
loadSpriteSheet(levelSpec.spriteSheet),
Expand Down
1 change: 0 additions & 1 deletion assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,5 @@ document.body.appendChild(startButton);

startButton.addEventListener('click', () => {
startButton.remove();
// Call your main function here
main(canvas);
});
6 changes: 1 addition & 5 deletions game.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="assets/css/style.css">
<link rel="stylesheet" href="assets/css/game.css">
<link href="assets/favicon/favicon.ico" rel="icon" type="image/x-icon">
<title>Game - Super Mario</title>
</head>

Expand Down Expand Up @@ -35,11 +36,6 @@ <h1 class="header-home">&#8203;</h1>
</div>
</header>
<main class="game-div">
<div class="cloud cloud1"></div>
<div class="cloud cloud2"></div>
<div class="cloud cloud3"></div>
<div class="cloud cloud4"></div>

<canvas id="screen" width="256" height="240"></canvas>
</main>
<footer>
Expand Down
2 changes: 1 addition & 1 deletion memory.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" href="assets/css/reset.css">
<link rel="stylesheet" href="assets/css/memory.css">
<link href="assets/favicon/favicon.ico" rel="icon" type="image/x-icon">
<title>Home - Super Mario</title>
<title>Memory - Super Mario</title>
</head>

<body>
Expand Down
Loading

0 comments on commit b425852

Please sign in to comment.