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
@@ -11,8 +11,19 @@
self.update = function () {
// Add any update logic for the hoop here
};
});
+// Class for the mushroom power ups
+var Mushroom = Container.expand(function () {
+ var self = Container.call(this);
+ var mushroomGraphics = self.attachAsset('mushroom', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ self.update = function () {
+ // Add any update logic for the mushroom here
+ };
+});
// Class for obstacles
var Obstacle = Container.expand(function () {
var self = Container.call(this);
var obstacleGraphics = self.attachAsset('obstacle', {
@@ -48,8 +59,9 @@
****/
// Initialize arrays and variables
var hoops = [];
var obstacles = [];
+var mushrooms = [];
var score = 0;
var scoreTxt = new Text2('0', {
size: 150,
fill: "#ffffff"
@@ -84,9 +96,9 @@
LK.showGameOver();
}
}
}
-// Create hoops and obstacles at intervals
+// Create hoops, obstacles and mushrooms at intervals
var hoopInterval = LK.setInterval(function () {
var newHoop = new Hoop();
newHoop.x = Math.random() * 2048;
newHoop.y = -100;
@@ -99,8 +111,15 @@
newObstacle.y = -100;
obstacles.push(newObstacle);
game.addChild(newObstacle);
}, 3000);
+var mushroomInterval = LK.setInterval(function () {
+ var newMushroom = new Mushroom();
+ newMushroom.x = Math.random() * 2048;
+ newMushroom.y = -100;
+ mushrooms.push(newMushroom);
+ game.addChild(newMushroom);
+}, 5000);
// Update function called every game tick
game.update = function () {
handleScoring();
handleObstacles();
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.