Ejemplo 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)
Ejemplo 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)
Ejemplo n.º 3
0
def escape(screenshot, adb: auto_adb):
    pos, val = template_matching(screenshot, image_reader('规避'))
    if val < 0.05:
        adb.tap_scale(pos)
Ejemplo 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)
Ejemplo n.º 5
0
def sortout(screenshot, adb: auto_adb):
    pos, val = template_matching(screenshot, '整理.jpg')
    if val < 0.05:
        adb.tap_scale(pos)
Ejemplo 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)
Ejemplo n.º 7
0
def cancel(screenshot, adb: auto_adb):
    pos, val = template_matching(screenshot, '取消.jpg')
    if val < 0.05:
        adb.tap_scale(pos)
Ejemplo n.º 8
0
def onekey_retire(screenshot, adb: auto_adb):
    pos, val = template_matching(screenshot, '一键退役.jpg')
    if val < 0.05:
        adb.tap_scale(pos)