forked from Jiahonzheng/JGM-Automator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
util.py
54 lines (42 loc) · 1.36 KB
/
util.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import time,json
# def load_json(file: str):
# f=open(file,encoding='utf-8')
# content=f.read()
# res=json.loads(content)
# # print(res)#打印字典
# return(res)
# def get_upgrade_list(json_list: dict):
# return list(zip(json_list['要升级的建筑物'], json_list['对应升级次数']))
# def clip_triangle()
def short_wait():
time.sleep(0.2)
def mid_wait():
time.sleep(0.5)
# 三个车厢货物的位置
GOODS_POSITIONS = { 1: (0.609,0.854),
2: (0.758,0.815),
3: (0.896,0.766)}
# 货物的那个叉叉的位置 相对位置
CROSS_POSITIONS = { 1: (0.632, 0.878),
2: (0.776, 0.836),
3: (991/1080, 1517/1920)}
# 各号建筑的位置
BUILDING_POSITIONS = {
1: (294/1080, 1184/1920),
2: (551/1080, 1061/1920),
3: (807/1080, 961/1920),
4: (275/1080, 935/1920),
5: (535/1080, 810/1920),
6: (799/1080, 687/1920),
7: (304/1080, 681/1920),
8: (541/1080, 568/1920),
9: (787/1080, 447/1920)
}
REDBAG_PHOTO_POSTION = {
'small': (216/1080, 700/1920),
'middle': (540/1080, 700/1920),
'large': (864/1080, 700/1920),
'photo': (540/1080, 1413/1920),
}
# if __name__ == '__main__':
# print(get_upgrade_list(load_json('./config.json')))