3
3
import Background from './Background.js'
4
4
import BackgroundTransitions from './BackgroundTransitions.js' ;
5
5
import Platform from './Platform.js' ;
6
+ import JumpPlatform from './PlatformJump.js' ;
6
7
import PlayerQuidditch from './PlayerQuidditch.js' ;
7
8
import BlockPlatform from './BlockPlatform.js' ;
8
9
import SpawnPlatform from './PlatformSpawn.js' ;
@@ -48,7 +49,18 @@ const assets = {
48
49
yellowredpattern : { src : "/images/platformer/platforms/yellowredpattern.jpg" } ,
49
50
lionpattern : { src : "/images/platformer/platforms/lionpattern.jpg" } ,
50
51
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
+ } ,
52
64
} ,
53
65
backgrounds : {
54
66
quidditch : { src : "/images/platformer/backgrounds/quidditch2.jpg" } ,
@@ -114,8 +126,13 @@ const assets = {
114
126
right : { row : 0 , frames : 0 , idleFrame : { column : 0 , frames : 0 } } , // Right Movement
115
127
} ,
116
128
}
129
+
117
130
} ;
118
131
132
+ setTimeout ( ( ) => {
133
+ alert ( "Collect wand to progress to next level!" ) ;
134
+ } , 2000 ) ;
135
+
119
136
// Quidditch Game Level defintion...
120
137
const objects = [
121
138
// GameObject(s), the order is important to z-index...
@@ -166,7 +183,7 @@ const assets = {
166
183
{ name : 'coin' , id : 'coin' , class : Coin , data : assets . obstacles . snitch , xPercentage : 0.375 , yPercentage : 0.7 } ,
167
184
{ name : 'coin' , id : 'coin' , class : Coin , data : assets . obstacles . snitch , xPercentage : 0.409 , yPercentage : 0.7 } ,
168
185
{ 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
170
187
{ name : 'chocoFrog' , id : 'chocoFrog' , class : ChocoFrog , data : assets . enemies . chocoFrog , xPercentage : 0.30 , yPercentage : 0.45 } ,
171
188
172
189
{ name : 'magicBeam' , id : 'magicBeam' , class : MagicBeam , data : assets . enemies . magicBeam , xPercentage : 0.623 , yPercentage : 0.72 } ,
@@ -181,6 +198,8 @@ const assets = {
181
198
{ name : 'waterEnd' , id : 'background' , class : BackgroundTransitions , data : assets . transitions . waterEnd } ,
182
199
] ;
183
200
201
+
202
+
184
203
const GameQuidditch = {
185
204
tag : 'Quidditch' ,
186
205
assets : assets ,
0 commit comments