Code edit (2 edits merged)
Please save this source code
User prompt
create a new bigobstacle. should behave the sameway as obstacles towards the dot
User prompt
bigobstacle should spawn in the center of x axis and not move sideways
User prompt
bigobstacles should rotateon its axis
User prompt
Fix Bug: 'TypeError: obstacles[i].move is not a function' in or related to this line: 'obstacles[i].move();' Line Number: 110
User prompt
Fix Bug: 'TypeError: obstacles[i].move is not a function' in or related to this line: 'obstacles[i].move();' Line Number: 110
User prompt
bigobstacle shouldnot move sideways
User prompt
Fix Bug: 'TypeError: obstacles[i].move is not a function' in or related to this line: 'obstacles[i].move();' Line Number: 111
User prompt
Fix Bug: 'TypeError: obstacles[i].move is not a function' in or related to this line: 'obstacles[i].move();' Line Number: 111
User prompt
bigobstacles should rotate on its axis on game start
User prompt
double size of bigobstacle
Code edit (1 edits merged)
Please save this source code
User prompt
bigobstacles should use the size set in the asset
User prompt
bigobstacle should rotate on its axis on game start
User prompt
dot interection with big obstacle should be based on pixels and not on asset surface
User prompt
Fix Bug: 'TypeError: dot.intersectsPixelPerfect is not a function' in or related to this line: 'if (dot.intersectsPixelPerfect(obstacles[i])) {' Line Number: 114
User prompt
dot interection with big obstacle should be based on pixels and not on asset surface
User prompt
Fix Bug: 'TypeError: dot.intersectsPixel is not a function' in or related to this line: 'if (dot.intersectsPixel(obstacles[i])) {' Line Number: 113
User prompt
dot interection with big obstacle should be based on pixels and not on asset surface
User prompt
Fix Bug: 'TypeError: dot.intersectsPixel is not a function' in or related to this line: 'if (obstacles[i] instanceof BigObstacle ? dot.intersectsPixel(obstacles[i]) : dot.intersects(obstacles[i])) {' Line Number: 113
User prompt
dot interection with big obstacle should be based on pixels and not on asset surface
User prompt
Fix Bug: 'TypeError: dot.intersectsPixel is not a function' in or related to this line: 'if (obstacles[i] instanceof BigObstacle && dot.intersectsPixel(obstacles[i])) {' Line Number: 113
User prompt
dot intersection with obstacles should be based on pixels and not asset area
User prompt
Fix Bug: 'TypeError: dot.intersectsPixelPerfect is not a function' in or related to this line: 'if (dot.intersectsPixelPerfect(obstacles[i])) {' Line Number: 113
User prompt
while dot is in on top of black background there is no game ove
===================================================================
--- original.js
+++ change.js
@@ -56,10 +56,11 @@
scaleY: 2 // Scale vertically by 2
});
self.direction = Math.random() < 0.5 ? -1 : 1;
self.speed = (Math.random() * 3 + 5) * self.direction;
- self.move = function () {
- // No horizontal movement for BigObstacle
+ self.rotationSpeed = 0.01;
+ self.update = function () {
+ self.rotation += self.rotationSpeed;
};
self.moveDown = function (distance) {
self.y += distance;
if (self.y > 2732 - self.height / 2) {