===================================================================
--- original.js
+++ change.js
@@ -14,9 +14,9 @@
self.velocity = 0;
self.flap = function () {
self.velocity += self.lift;
};
- self.update = function () {
+ self._update_migrated = function () {
self.velocity += self.gravity;
self.y += self.velocity;
if (self.y > 2732 - birdGraphics.height / 2) {
self.y = 2732 - birdGraphics.height / 2;
@@ -35,9 +35,9 @@
anchorX: 0.5,
anchorY: 0.5
});
self.speed = -2;
- self.move = function () {
+ self._move_migrated = function () {
self.x += self.speed;
};
});
// Pipe class
@@ -134,14 +134,14 @@
if (currentTime - lastPipeTime > pipeInterval) {
addPipe();
lastPipeTime = currentTime;
}
- bird.update();
+ bird._update_migrated();
updatePipes();
checkCollision();
// Update clouds
for (var i = clouds.length - 1; i >= 0; i--) {
- clouds[i].move();
+ clouds[i]._move_migrated();
if (clouds[i].x < -200) {
clouds[i].x = 2048;
clouds[i].y = Math.random() * 2732;
}
A yellow bird. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A green pipe facing upwards. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Clouds. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.