Esempio n. 1
0
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)
Esempio n. 2
0
 def test_getarea(self):
     shot = cv2.imdecode(
         numpy.fromfile('resource/image/mid-way-2.jpg', numpy.uint8),
         cv2.IMREAD_COLOR)
     template = cv2.imdecode(
         numpy.fromfile('resource/image/迎击.jpg', numpy.uint8),
         cv2.IMREAD_COLOR)
     template_matching(shot, template)
Esempio n. 3
0
def escape(screenshot, adb: auto_adb):
    pos, val = template_matching(screenshot, image_reader('规避'))
    if val < 0.05:
        adb.tap_scale(pos)
Esempio n. 4
0
def start_mission(screenshot, adb: auto_adb):
    pos, val = template_matching(screenshot, image_reader('立即前往'))
    if val < 0.05:
        adb.tap_scale(pos)
Esempio n. 5
0
def sortout(screenshot, adb: auto_adb):
    pos, val = template_matching(screenshot, '整理.jpg')
    if val < 0.05:
        adb.tap_scale(pos)
Esempio n. 6
0
def attack_confirm(screenshot, adb: auto_adb):
    pos, val = template_matching(screenshot, image_reader('出击'))
    if val < 0.05:
        adb.tap_scale(pos)
Esempio n. 7
0
def cancel(screenshot, adb: auto_adb):
    pos, val = template_matching(screenshot, '取消.jpg')
    if val < 0.05:
        adb.tap_scale(pos)
Esempio n. 8
0
def onekey_retire(screenshot, adb: auto_adb):
    pos, val = template_matching(screenshot, '一键退役.jpg')
    if val < 0.05:
        adb.tap_scale(pos)