refactoring to game base class
This commit is contained in:
@@ -6,6 +6,7 @@ from hsvfilter import HsvFilter
|
||||
import pydirectinput
|
||||
from utils import dig_point
|
||||
from game_base_class import GameBase
|
||||
from window_capture import WindowCapture
|
||||
|
||||
EMITTER_MAIN = "main"
|
||||
EMITTER_MUSH = "mushroom"
|
||||
@@ -30,6 +31,9 @@ class Equipment(GameBase):
|
||||
self.masks = []
|
||||
self.emitters = []
|
||||
|
||||
# initialize the StunWindowCapture class
|
||||
self.capture_window = WindowCapture(None, "equip", self.config)
|
||||
|
||||
self.EMITTER_TO_USE = str(overlay.emitter_use.get())
|
||||
self.SPAWN_COUNT = int(overlay.spawn_use.get())
|
||||
self.ENERGY_TO_USE = int(overlay.energy_use.get())
|
||||
|
||||
3
magic.py
3
magic.py
@@ -3,6 +3,7 @@ import cv2 as cv
|
||||
from hsvfilter import HsvFilter
|
||||
import pydirectinput
|
||||
from game_base_class import GameBase
|
||||
from window_capture import WindowCapture
|
||||
|
||||
|
||||
class Magic(GameBase):
|
||||
@@ -12,6 +13,8 @@ class Magic(GameBase):
|
||||
|
||||
self.SPAWN_COUNT = int(overlay.spawn_use.get())
|
||||
|
||||
self.capture_window = WindowCapture(None, "magic", self.config)
|
||||
|
||||
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)
|
||||
|
||||
3
mine.py
3
mine.py
@@ -1,6 +1,7 @@
|
||||
import cv2 as cv
|
||||
from utils import dig_point, check_for_ok_button
|
||||
from game_base_class import GameBase
|
||||
from window_capture import WindowCapture
|
||||
|
||||
|
||||
class Mine(GameBase):
|
||||
@@ -8,6 +9,8 @@ class Mine(GameBase):
|
||||
def __init__(self, overlay):
|
||||
super().__init__(overlay)
|
||||
|
||||
self.capture_window = WindowCapture(None, "screen_conf", self.config)
|
||||
|
||||
self.level = 1
|
||||
|
||||
self.width = 32
|
||||
|
||||
Reference in New Issue
Block a user