Commit 42b75f77 authored by Alan Aguiar's avatar Alan Aguiar
Browse files

add another state of bird

parent 17cfdbde
......@@ -6,6 +6,7 @@ import random
bird_h = pygame.image.load('images/bird_h_alfa.png')
bird_u = pygame.image.load('images/bird_u_alfa.png')
bird_d1 = pygame.image.load('images/bird_d45_alfa.png')
class Bird(pygame.sprite.Sprite):
......@@ -35,11 +36,14 @@ class Bird(pygame.sprite.Sprite):
def update(self):
self.count = self.count - 1
if self.count < 0:
self.count = 0
self.setImage(bird_d1)
self.mPos[1] = self.mPos[1] + self.mAcc
elif self.count < 10:
self.setImage(bird_h)
self.mPos[1] = self.mPos[1] + self.mAcc
self.rect.y = self.mPos[1]
else:
self.mPos[1] = self.mPos[1] - self.mVel
......
......@@ -56,7 +56,7 @@ class Flappy():
if event.type == pygame.QUIT:
self.running = False
elif event.type == pygame.MOUSEBUTTONDOWN:
self.bird.setVel(5)
self.bird.setVel(8)
elif event.type == pygame.KEYDOWN:
pass
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment