flappy init
This commit is contained in:
@@ -25,5 +25,12 @@ class Flappy(GameBase):
|
|||||||
cv.waitKey(int(wait_timer))
|
cv.waitKey(int(wait_timer))
|
||||||
if self.flappy_pos_disc.next_gate_height[0] is not 0:
|
if self.flappy_pos_disc.next_gate_height[0] is not 0:
|
||||||
offset = (self.flappy_pos_disc.next_gate_height[0] + 120) - self.flappy_pos_disc.current_pet_height
|
offset = (self.flappy_pos_disc.next_gate_height[0] + 120) - self.flappy_pos_disc.current_pet_height
|
||||||
|
if offset > 50:
|
||||||
|
offset = 50
|
||||||
|
elif offset < -50:
|
||||||
|
offset = -50
|
||||||
print(offset)
|
print(offset)
|
||||||
wait_timer = wait_timer - (offset / 2)
|
wait_timer = 380 + offset
|
||||||
|
print(wait_timer)
|
||||||
|
print("pet_pos: ", self.flappy_pos_disc.current_pet_height)
|
||||||
|
print("next gate: ", self.flappy_pos_disc.next_gate_height[0] + 120)
|
||||||
Reference in New Issue
Block a user