flappy init
This commit is contained in:
17
flappy.py
17
flappy.py
@@ -34,13 +34,28 @@ class Flappy(GameBase):
|
||||
|
||||
def assess_playfield_and_make_move(self):
|
||||
#last_letter_received = time()
|
||||
wait_timer = 380
|
||||
while True:
|
||||
if self.overlay.run_mode == 'stopped' or self.overlay.run_mode == 'paused':
|
||||
return
|
||||
pydirectinput.mouseDown()
|
||||
cv.waitKey(50)
|
||||
pydirectinput.mouseUp()
|
||||
cv.waitKey(250)
|
||||
cv.waitKey(wait_timer)
|
||||
|
||||
offset = (self.flappy_pos_disc.next_gate_height + 170) - self.flappy_pos_disc.current_pet_height
|
||||
if offset < -100:
|
||||
#pet go down
|
||||
wait_timer = 430
|
||||
elif 0 > offset > -100:
|
||||
wait_timer = 405
|
||||
elif 0 < offset < 50:
|
||||
wait_timer = 355
|
||||
elif offset > 50:
|
||||
wait_timer = 330
|
||||
|
||||
|
||||
|
||||
'''
|
||||
if self.stone_id_thread.get_pick_up_status() == False:
|
||||
if (time() - last_letter_received) >= 5:
|
||||
|
||||
Reference in New Issue
Block a user