User prompt
Change background color from black to pastel
User prompt
Change background color to #D2918C
User prompt
Change background color to #EC8D8
User prompt
Change background color to #FFCBCB
User prompt
decrease background opacity by 20%
User prompt
give the background a white overlay with 10% opacity
User prompt
Fix Bug: 'Uncaught TypeError: Graphics is not a constructor' in this line: 'var whiteOverlay = new Graphics();' Line Number: 191
User prompt
remove ball drop shadow
User prompt
When player scores a point with ball, asset appears over hooprimseparate for 1 second
User prompt
When player scores a point with ball, hooprimseparate gets overlay of a different asset for 1 second
User prompt
When player scores a point with ball, hooprimseparate changes into a different asset for 1 second
User prompt
When player scores a point with ball, new asset appears under the hooprimseparate for 1 second
User prompt
When player scores a point with ball, new asset appears on hooprimseparate for 1 second and it always moves with hooprimseparate
User prompt
When player scores the cat, for one second turn hooprimseparate visual into hooprimflash asset visual. Then games continues normally
User prompt
Put hooprimflash visuals that appear 400 pixels lower on Y axis
User prompt
Put hooprimflash visuals 200 pixels lower on Y axis
User prompt
hooprimflash asset can exist in the game only for 1 second and then disappear
User prompt
When hooprimflash appears, it's on top of hooprimseparate and hooprimflash never disappears
User prompt
hooprimflash asset can exist in the game only for 1 second and then disappear
User prompt
When player scores the ball, for one second put hooprimflash visual over hooprimseparate. Then games continues normally
User prompt
When player scores a ball spawn hoopflash asset on top of hooprim. Make hoopflash asset a child of hooprim. hoopflash child moves together with hooprim
User prompt
move hoop flash 250 pixels lower
User prompt
move hoop flash 20 pixels higher
User prompt
move hooptop 1 pixel to the left
User prompt
move hooptop 1 pixel to the left
===================================================================
--- original.js
+++ change.js
@@ -1,7 +1,20 @@
/****
* Classes
****/
+var ScoredAsset = Container.expand(function () {
+ var self = Container.call(this);
+ var scoredAssetGraphics = self.createAsset('scoredAsset', 'Scored Asset', 0.5, 0.5);
+ scoredAssetGraphics.zIndex = 996;
+ self.addChild(scoredAssetGraphics);
+ self.lifeSpan = 60; // 1 second at 60FPS
+ self.update = function () {
+ self.lifeSpan--;
+ if (self.lifeSpan <= 0) {
+ self.destroy();
+ }
+ };
+});
var Particle = Container.expand(function () {
var self = Container.call(this);
self.interactive = false;
var particleGraphics = self.createAsset('fireParticle', 'Fire Particle', 0.5, 0.5);
@@ -23,23 +36,11 @@
};
});
var HoopRim = Container.expand(function () {
var self = Container.call(this);
- self.defaultHoopRimGraphics = LK.getAsset('hoopRimSeparate', 'Basketball Hoop Rim Separate', .5, .5);
- self.defaultHoopRimGraphics.zIndex = 997;
- self.addChild(self.defaultHoopRimGraphics);
- self.scoredHoopRimGraphics = LK.getAsset('hoopRimScored', 'Scored Basketball Hoop Rim', .5, .5);
- self.scoredHoopRimGraphics.zIndex = 997;
- self.scoredHoopRimGraphics.visible = false;
- self.addChild(self.scoredHoopRimGraphics);
- self.showScoredGraphics = function () {
- self.defaultHoopRimGraphics.visible = false;
- self.scoredHoopRimGraphics.visible = true;
- LK.setTimeout(function () {
- self.defaultHoopRimGraphics.visible = true;
- self.scoredHoopRimGraphics.visible = false;
- }, 1000);
- };
+ var hoopRimGraphics = LK.getAsset('hoopRimSeparate', 'Basketball Hoop Rim Separate', .5, .5);
+ hoopRimGraphics.zIndex = 997;
+ self.addChild(hoopRimGraphics);
});
var Ball = Container.expand(function () {
var self = Container.call(this);
self.hasScored = false;
@@ -353,13 +354,17 @@
}
} else if (ball.hasThrown && ball.intersects(hoop.hoopRimGraphics) && ball.speed.y > 0 && !ball.hasScored && !ball.hasBounced && ball.x > hoop.x + hoop.leftElement.x && ball.x < hoop.x + hoop.rightElement.x) {
ball.hasScored = true;
score += scoreMultiplier * 2;
- hoopRim.showScoredGraphics();
if (score === 2024) {
LK.showGameOver();
} else {
hoop.scoreLabel.setText(score.toString());
hoop.setScore(score);
+ // Instantiate and display the ScoredAsset
+ var scoredAsset = new ScoredAsset();
+ scoredAsset.x = hoopRim.x;
+ scoredAsset.y = hoopRim.y + hoopRim.height / 2;
+ game.addChild(scoredAsset);
}
}
});
\ No newline at end of file
4:3 Simple rectangle white outline. Black background
Very cute cat looking into camera. Full body cat. Cartoon art style. Ginger cat. No UI elements in the picture like popups, close buttons etc.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
background
Head of a cute ginger cat peeking from a box
heart. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.