-
Notifications
You must be signed in to change notification settings - Fork 1
/
__init__.py
41 lines (31 loc) · 1016 Bytes
/
__init__.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
from components import (
EmulateAdapter,
ImageProducer,
InputHandler,
PlayerDetector,
RecoilSuppressor,
WeaponDetector,
)
from pynput.keyboard import Key, Listener
from structures import thread_manager
def on_press(key):
if key == Key.delete:
global listener
thread_manager.terminate()
listener.stop()
listener = Listener(on_press=on_press)
if __name__ == "__main__":
# emulate_adapter = EmulateAdapter()
image_producer = ImageProducer()
# input_handler = InputHandler()
player_detector = PlayerDetector("apex_8s.pt")
# recoil_suppressor = RecoilSuppressor()
weapon_detector = WeaponDetector()
image_producer.add_tasker(weapon_detector)
image_producer.add_tasker(player_detector)
# input_handler.add_tasker(recoil_suppressor)
# weapon_detector.add_subscriber(recoil_suppressor)
# recoil_suppressor.add_consumer(emulate_adapter)
listener.start()
print("Press delete to stop")
thread_manager.start()