User prompt
add horizontal movement to the enemy
User prompt
add movement to enemy
Code edit (2 edits merged)
Please save this source code
User prompt
spawn enemy on the bottom right of the screen moving to the left
User prompt
Fix Bug: 'ReferenceError: Obstacle is not defined' in this line: 'var newObstacle = new Obstacle();' Line Number: 73
User prompt
add enemy class
User prompt
move hero 200 pixels back
Code edit (1 edits merged)
Please save this source code
User prompt
increase gravity for hero so that it glides more
User prompt
on click hero shoots a bullet dowwards
User prompt
replace surfer with hero
User prompt
Add background color
User prompt
Move surfer to the center of the screen
User prompt
Hero should rotate on his axis when ita going up or down
Initial prompt
Flappy Surf
===================================================================
--- original.js
+++ change.js
@@ -83,9 +83,9 @@
newObstacle.y = Math.random() * 2732;
obstacles.push(newObstacle);
self.addChild(newObstacle);
}
- if (tickOffset % 240 == 0) {
+ if (tickOffset++ % 240 == 0) {
var enemy = new Enemy();
enemy.x = 2048;
enemy.y = 2732 - enemy.height / 2;
self.addChild(enemy);