MCPcopy Create free account
hub / github.com/geekcomputers/Python / __init__

Method __init__

flappyBird_pygame/flappy_bird.py:30–36  ·  view source on GitHub ↗
(self, x, y, ms_to_up, images)

Source from the content-addressed store, hash-verified

28 UP_DURATION = 150 # time for which bird go up
29
30 def __init__(self, x, y, ms_to_up, images):
31 super(Bird, self).__init__()
32 self.x, self.y = x, y
33 self.ms_to_up = ms_to_up
34 self._img_wingup, self._img_wingdown = images
35 self._mask_wingup = pygame.mask.from_surface(self._img_wingup)
36 self._mask_wingdown = pygame.mask.from_surface(self._img_wingdown)
37
38 def update(self, delta_frames=1):
39 if self.ms_to_up > 0:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected