User prompt
Black background
User prompt
Make a mushroom power up to give me an extra life
User prompt
Make Joy con stick controller to move the character
User prompt
Make the fireballs The skull
User prompt
Make the fireball transform you and make you shoot fires balls by tapping two times
User prompt
Please fix the bug: 'ReferenceError: Can't find variable: fireBalls' in or related to this line: 'for (var i = fireBalls.length - 1; i >= 0; i--) {' Line Number: 199
User prompt
Please fix the bug: 'ReferenceError: Can't find variable: firePowerUps' in or related to this line: 'for (var i = firePowerUps.length - 1; i >= 0; i--) {' Line Number: 182
User prompt
Make a fire power up that can throw fireballs at the skulls to make them disappear
User prompt
Make mushroom power ups
User prompt
Make the background a court
User prompt
Make the background a beach
Initial prompt
Slimy basketball
===================================================================
--- original.js
+++ change.js
@@ -85,8 +85,9 @@
var obstacles = [];
var mushrooms = [];
var firePowerUps = [];
var fireBalls = [];
+var fireBallPowerUp = false;
var score = 0;
var scoreTxt = new Text2('0', {
size: 150,
fill: "#ffffff"
@@ -177,13 +178,9 @@
}
if (slimyBall.intersects(firePowerUps[i])) {
firePowerUps[i].destroy();
firePowerUps.splice(i, 1);
- var newFireBall = new FireBall();
- newFireBall.x = slimyBall.x;
- newFireBall.y = slimyBall.y;
- fireBalls.push(newFireBall);
- game.addChild(newFireBall);
+ fireBallPowerUp = true;
}
}
for (var i = fireBalls.length - 1; i >= 0; i--) {
fireBalls[i].y += 5;
@@ -203,10 +200,22 @@
}
};
// Event listeners for touch/mouse events
game.move = handleMove;
+var tapCount = 0;
game.down = function (x, y, obj) {
handleMove(x, y, obj);
+ if (fireBallPowerUp) {
+ tapCount++;
+ if (tapCount == 2) {
+ var newFireBall = new FireBall();
+ newFireBall.x = slimyBall.x;
+ newFireBall.y = slimyBall.y;
+ fireBalls.push(newFireBall);
+ game.addChild(newFireBall);
+ tapCount = 0;
+ }
+ }
};
game.up = function (x, y, obj) {
// No action needed on up event for now
};
\ No newline at end of file
3-D slime Person. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Skull. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Basketball. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Fireball. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Mario mushroom. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.