Fix background clicks and mirror scene boundaries with run feedback
This commit is contained in:
+15
-1
@@ -146,7 +146,21 @@ class AalcEngine(Engine):
|
|||||||
|
|
||||||
# ---- 动手 (AALC 输入后端,由 config.yaml 决定后台消息/前台输入) ----
|
# ---- 动手 (AALC 输入后端,由 config.yaml 决定后台消息/前台输入) ----
|
||||||
def click(self, x, y, times=1):
|
def click(self, x, y, times=1):
|
||||||
self.auto.mouse_click(int(x), int(y), times=int(times))
|
if not self.cfg.simulator and self.cfg.win_input_type == 'background':
|
||||||
|
handler = self.auto.input_handler
|
||||||
|
self.auto.wait_pause()
|
||||||
|
for _ in range(int(times)):
|
||||||
|
handler.set_mouse_pos(int(x), int(y))
|
||||||
|
handler.set_active()
|
||||||
|
handler.mouse_down(int(x), int(y))
|
||||||
|
try:
|
||||||
|
time.sleep(0.12)
|
||||||
|
finally:
|
||||||
|
handler.mouse_up(int(x), int(y))
|
||||||
|
# Let Unity consume the release before another target is selected.
|
||||||
|
time.sleep(0.12)
|
||||||
|
else:
|
||||||
|
self.auto.mouse_click(int(x), int(y), times=int(times))
|
||||||
|
|
||||||
def keypress(self, key):
|
def keypress(self, key):
|
||||||
k = str(key).lower()
|
k = str(key).lower()
|
||||||
|
|||||||
Reference in New Issue
Block a user