update flappy
This commit is contained in:
18
flappy.py
18
flappy.py
@@ -18,11 +18,14 @@ class Flappy(GameBase):
|
||||
while True:
|
||||
if self.overlay.run_mode == 'stopped' or self.overlay.run_mode == 'paused':
|
||||
return
|
||||
tmp = 20
|
||||
self.click()
|
||||
cv.waitKey(int(100))
|
||||
if tmp % 5 == 0:
|
||||
self.click()
|
||||
cv.waitKey(int(wait_timer -100))
|
||||
|
||||
pydirectinput.mouseDown()
|
||||
cv.waitKey(50)
|
||||
pydirectinput.mouseUp()
|
||||
cv.waitKey(int(wait_timer))
|
||||
'''
|
||||
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
|
||||
if offset > 50:
|
||||
@@ -33,4 +36,9 @@ class Flappy(GameBase):
|
||||
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)
|
||||
print("next gate: ", self.flappy_pos_disc.next_gate_height[0] + 120) '''
|
||||
|
||||
def click(self):
|
||||
pydirectinput.mouseDown()
|
||||
cv.waitKey(50)
|
||||
pydirectinput.mouseUp()
|
||||
Reference in New Issue
Block a user