-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsettings.py
33 lines (24 loc) · 920 Bytes
/
settings.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
import pyautogui as pag
from win32api import GetMonitorInfo, MonitorFromPoint
# CONSTANTS
nano_const = pow(10, 9)
# PHYSICS
gravity = -4000.0
accelerationRate = 800
dragCoefficient = 1.02
smallestStoppingSpeed = 1
smallestStoppingDistance = 1
# CHARACTER MOVING
jumpSpeedRetentions = (2, 1, 0)
jumpHeights = (0.1, 0.5, 1.0)
# Get all nessesary monitor dimention information
monitor_info = GetMonitorInfo(MonitorFromPoint((0, 0)))
raw_work_area = monitor_info.get("Work")
raw_monitor_area = monitor_info.get("Monitor")
monitor_area = raw_monitor_area[2], raw_monitor_area[3]
print("The monitor size is {}x{}.".format(monitor_area[0], monitor_area[1]))
taskbar_height = raw_monitor_area[3] - raw_work_area[3]
print("The taskbar height is {}.".format(taskbar_height))
work_area = [raw_work_area[2], raw_work_area[3]]
print("The work area size is {}x{}.".format(work_area[0], work_area[1]))
screen_res = pag.size()