def confirm(screenshot, adb: auto_adb): pos, val = template_matching(screenshot, image_reader('确定橙')) if val < 0.05: adb.tap_scale(pos) pos, val = template_matching(screenshot, image_reader('确定蓝')) if val < 0.05: adb.tap_scale(pos)
def escape(screenshot, adb: auto_adb): pos, val = template_matching(screenshot, image_reader('规避')) if val < 0.05: adb.tap_scale(pos)
def start_mission(screenshot, adb: auto_adb): pos, val = template_matching(screenshot, image_reader('立即前往')) if val < 0.05: adb.tap_scale(pos)
def attack_confirm(screenshot, adb: auto_adb): pos, val = template_matching(screenshot, image_reader('出击')) if val < 0.05: adb.tap_scale(pos)
def test_template_matching(self): im1 = image_reader('testemeny') im2 = image_reader('boss') # template_matching(im1,im2) Moving.find_enemy(im1)
def test_撤退(self): im = image_reader('撤退') image_show(im)