Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
ZYX committed Jun 29, 2024
1 parent d5f9955 commit b56f257
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion diver.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class DivergentUniverse(UniverseUtils):
def __init__(self, debug=0, nums=-1, speed=0):
super().__init__()
self._stop = True
self.end = 0
self.floor = 0
self.allow_e = 1
self.count = self.my_cnt = 0
Expand Down Expand Up @@ -111,6 +112,11 @@ def loop(self):
if static_res != '':
print(static_res)
break
if self.end and res == '加载界面':
self.press('esc')
time.sleep(2)
self.press('esc')
self._stop = True

def do_action(self, action) -> int:
if type(action) == str:
Expand Down Expand Up @@ -833,7 +839,7 @@ def end_of_uni(self):
)
if self.debug == 0 and self.check_bonus == 0 and self.nums <= self.my_cnt and self.nums >= 0:
log.info('已完成上限,准备停止运行')
self._stop = True
self.end = 1
self.floor = 0
self.init_floor()

Expand Down Expand Up @@ -907,6 +913,7 @@ def on_key_press(self, event):
self.stop()

def start(self):
self.__init__()
self._stop = False
keyboard.on_press(self.on_key_press)
self.keys = KeyController(self)
Expand Down

0 comments on commit b56f257

Please sign in to comment.