Пример #1
0
 def __init__(self, bg=False):
     self.imgs = action.load_imgs()
     self.is_background = bg
Пример #2
0
import cv2, time, random, os
import action

debug_mode = 0

# 读取文件
imgs = action.load_imgs()

os.system("adb devices")
start_time = time.time()
print('程序启动,现在时间', time.ctime())
print('菜单:1 结界自动合卡,2 自动通关魂十,3 自动通关业原火,4 自动刷组队狗粮(打手模式) ')
#以上启动,载入设置

##########################################################
if debug_mode:
    mode = debug_mode
else:
    raw = input("选择功能模式:")
    mode = int(raw)

action.alarm(1)
print("开始运行")

##########################################################
#合成结界卡,较简单,未偏移直接点
while mode == 1:
    x, y, z = (370, 238), (384, 385), (391, 525)  #前三张卡的位置
    zz = (871, 615)  #合成按钮位置
    for i in [x, y, z, zz]:
        action.touch(i)
Пример #3
0
import os
import time

from cv2 import cv2

import action

imgs = action.load_imgs(0.7)

a = "adb shell screencap -p sdcard/screen.jpg"
b = "adb pull sdcard/screen.jpg"
for row in [a, b]:
    time.sleep(0.5)
    os.system(row)
screen = cv2.imread('screen.jpg')

pts = action.locate(screen, imgs['jinbi2'], 1)
print(pts)