refactoring to game base class

This commit is contained in:
2022-10-17 17:11:56 +02:00
parent 433170b4c8
commit 14a5983d17
22 changed files with 47 additions and 422 deletions

View File

@@ -1,25 +1,17 @@
import random
from window_capture import WindowCapture
from vision import Vision
import cv2 as cv
from hsvfilter import HsvFilter
from config_file import UserConfigs
import pydirectinput
from game_base_class import GameBase
class Magic:
class Magic(GameBase):
def __init__(self, overlay):
self.overlay = overlay
self.config = UserConfigs()
super().__init__(overlay)
self.SPAWN_COUNT = int(overlay.spawn_use.get())
self.capture_window = WindowCapture(None, "magic", self.config)
# initialize the StunVision class
self.vision_stun = Vision()
# initialize the StunOverlay class
hsv_filter_orange = HsvFilter(10, 156, 0, 17, 255, 255, 0, 0, 0, 0)
hsv_filter_p = HsvFilter(130, 156, 0, 179, 255, 255, 0, 0, 0, 0)
hsv_filter_b = HsvFilter(88, 156, 0, 128, 255, 255, 0, 0, 0, 0)