Skip to content

Commit f2e659e

Browse files
authored
Merge pull request #118 from casonpollak/ethan
Update harry potter level with wand
2 parents 990c28a + 33bc29a commit f2e659e

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

assets/js/platformer/GameSetterQuidditch.js

+21-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import Background from './Background.js'
44
import BackgroundTransitions from './BackgroundTransitions.js';
55
import Platform from './Platform.js';
6+
import JumpPlatform from './PlatformJump.js';
67
import PlayerQuidditch from './PlayerQuidditch.js';
78
import BlockPlatform from './BlockPlatform.js';
89
import SpawnPlatform from './PlatformSpawn.js';
@@ -48,7 +49,18 @@ const assets = {
4849
yellowredpattern: { src: "/images/platformer/platforms/yellowredpattern.jpg" },
4950
lionpattern: { src: "/images/platformer/platforms/lionpattern.jpg" },
5051
turf: { src: "/images/platformer/platforms/turf.png" },
51-
52+
itemBlock: {
53+
src: "/images/platformer/wand.png",
54+
sizeRatio: 83.2,
55+
widthRatio: 1.0,
56+
heightRatio: 1.0,
57+
width: 5952, // 204
58+
height: 6000, // 204
59+
scaleSize: 10, // 80
60+
speedRatio: 0.7,
61+
opacity: 0,
62+
hitbox: { widthPercentage: 0.4, heightPercentage: -0.2 }
63+
},
5264
},
5365
backgrounds: {
5466
quidditch: { src: "/images/platformer/backgrounds/quidditch2.jpg" },
@@ -114,8 +126,13 @@ const assets = {
114126
right: { row: 0, frames: 0, idleFrame: { column: 0, frames: 0 } }, // Right Movement
115127
},
116128
}
129+
117130
};
118131

132+
setTimeout(() => {
133+
alert("Collect wand to progress to next level!");
134+
}, 2000);
135+
119136
// Quidditch Game Level defintion...
120137
const objects = [
121138
// GameObject(s), the order is important to z-index...
@@ -166,7 +183,7 @@ const assets = {
166183
{ name: 'coin', id: 'coin', class: Coin, data: assets.obstacles.snitch, xPercentage: 0.375, yPercentage: 0.7 },
167184
{ name: 'coin', id: 'coin', class: Coin, data: assets.obstacles.snitch, xPercentage: 0.409, yPercentage: 0.7 },
168185
{ name: 'coin', id: 'coin', class: Coin, data: assets.obstacles.snitch, xPercentage: 0.295, yPercentage: 0.46 },
169-
186+
{ name: 'itemBlock', id: 'JumpPlatform', class: JumpPlatform, data: assets.platforms.itemBlock, xPercentage: 0.5999, yPercentage: 0.6}, //item block is a platform
170187
{ name: 'chocoFrog', id: 'chocoFrog', class: ChocoFrog, data: assets.enemies.chocoFrog, xPercentage: 0.30, yPercentage: 0.45},
171188

172189
{ name: 'magicBeam', id: 'magicBeam', class: MagicBeam, data: assets.enemies.magicBeam, xPercentage: 0.623, yPercentage: 0.72 },
@@ -181,6 +198,8 @@ const assets = {
181198
{ name: 'waterEnd', id: 'background', class: BackgroundTransitions, data: assets.transitions.waterEnd },
182199
];
183200

201+
202+
184203
const GameQuidditch = {
185204
tag: 'Quidditch',
186205
assets: assets,

images/platformer/wand.png

17.2 KB
Loading

0 commit comments

Comments
 (0)