User prompt
smallobstacle should move downards on tick in relation to dot like obstacles do
User prompt
small obstacle can havev a different asset as the obstacle
User prompt
small obstacles should appear also orbiting about the first start
User prompt
small obstacle should orbit arround the star
User prompt
every time a star is spawned add a orbit of smallobstacles around it
User prompt
small obstacle should make an orbit arround the start
User prompt
create a new smallobstacle class.
Code edit (1 edits merged)
Please save this source code
User prompt
dotparticle effect sshould only happen once per game
Code edit (1 edits merged)
Please save this source code
User prompt
player should not be able to bounce up if dot is destoyred
User prompt
unify the two lk.on tick events
User prompt
Fix Bug: 'ReferenceError: dot is not defined' in or related to this line: 'dot.update();' Line Number: 194
User prompt
Fix Bug: 'ReferenceError: dot is not defined' in or related to this line: 'dot.update();' Line Number: 172
User prompt
make sure there is only 1 dot instance
Code edit (1 edits merged)
Please save this source code
User prompt
dotparticle effectshould esplodein a ciruclar way
Code edit (2 edits merged)
Please save this source code
User prompt
make dotsparticles from effect smaller
Code edit (1 edits merged)
Please save this source code
User prompt
create a new dotparticle effect for when the dot is destroyed. do not modify the current partcileeffect
Code edit (1 edits merged)
Please save this source code
User prompt
destroy dot if it intersects with obscatle
Code edit (1 edits merged)
Please save this source code
User prompt
game overshould wait 2 seconds to appear after dotis destoyred
===================================================================
--- original.js
+++ change.js
@@ -10,13 +10,16 @@
self.direction = Math.random() < 0.5 ? -1 : 1;
self.speed = (Math.random() * 2 + 3) * self.direction;
self.rotationSpeed = 0.05;
self.rotation = 0;
- self.move = function (star) {
+ self.move = function (star, dotMovedDistance) {
self.rotation += self.rotationSpeed;
self.x = star.x + Math.cos(self.rotation) * 300;
self.y = star.y + Math.sin(self.rotation) * 300;
smallobstacleGraphics.rotation = self.rotation;
+ if (dotMovedDistance < 0) {
+ self.y -= dotMovedDistance;
+ }
};
self.moveDown = function (distance) {
self.y += distance;
if (self.y > 2732 - self.height / 2) {
@@ -207,9 +210,9 @@
var smallobstacle = game.addChild(new Smallobstacle());
smallobstacle.x = star.x;
smallobstacle.y = star.y;
smallobstacle.rotation = 2 * Math.PI / 5 * i;
- smallobstacle.move(star);
+ smallobstacle.move(star, dot.movedDistance);
}
LK.on('tick', function () {
dot.update();
for (var i = 0; i < obstacles.length; i++) {