Code edit (1 edits merged)
Please save this source code
User prompt
the static shape, when spawned, should scale up to 4 times its original size over 2 seconds
Code edit (2 edits merged)
Please save this source code
User prompt
when player clicks, spawn a shape that doesn't move where he clicked
User prompt
all shapes should move at the same speed regardless of their direction
User prompt
give each shape a random movement direction with velocity 5 and make them move, bouncing on screen edges
Code edit (5 edits merged)
Please save this source code
User prompt
place the shapes initially visibly on screen
Code edit (2 edits merged)
Please save this source code
User prompt
on game start show the text: Level 1 - Explode 1 of 5 shapes
Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'Uncaught TypeError: Graphics is not a constructor' in this line: 'shapeGraphics = new Graphics();' Line Number: 20
User prompt
shapes should be drawn wih drawing api instead of with imported assets
User prompt
the shape class on instantiation should either draw a sphere, a triangle, or a square of a random bright color
User prompt
Fix Bug: 'TypeError: shape.containsPoint is not a function' in this line: 'if (shape.containsPoint(pos)) {' Line Number: 20
Initial prompt
Shapes Chain Reaction
===================================================================
--- original.js
+++ change.js
@@ -34,10 +34,10 @@
levelText.y = 150;
LK.gui.topCenter.addChild(levelText);
for (var i = 0; i < 5; i++) {
var shape = self.addChild(new Shape());
- shape.x = Math.random() * (2048 - shape.width);
- shape.y = Math.random() * (2732 - shape.height);
+ shape.x = Math.random() * (1024 - shape.width);
+ shape.y = Math.random() * (1366 - shape.height);
shapes.push(shape);
}
stage.on('down', function (obj) {
var event = obj.event;
a white geometric square shape Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a white dot Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
flat white round disk Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
gif circle spinning animation Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.