diff --git a/flappy-bird/Bird.lua b/flappy-bird/Bird.lua index 8f0df91..4cc568b 100644 --- a/flappy-bird/Bird.lua +++ b/flappy-bird/Bird.lua @@ -10,7 +10,7 @@ Bird = Class{} -local GRAVITY = 20 +local GRAVITY = 1200 function Bird:init() self.image = love.graphics.newImage('bird.png') @@ -24,13 +24,13 @@ function Bird:update(dt) self.dy = self.dy + GRAVITY * dt if love.keyboard.wasPressed('space') then - self.dy = -5 + self.dy = -300 sounds['jump']:play() end - self.y = self.y + self.dy + self.y = self.y + self.dy * dt end function Bird:render() love.graphics.draw(self.image, self.x, self.y) -end \ No newline at end of file +end