added sleep time after game restart
This commit is contained in:
parent
443840b2ca
commit
8669b07ceb
|
|
@ -186,6 +186,7 @@ class FlowerGameEnv(gym.Env):
|
|||
found_blue = np.any(np.all(np.abs(rgb_data - target_color) <= tolerance, axis=-1))
|
||||
if found_blue:
|
||||
pyautogui.hotkey("ctrl", "p")
|
||||
time.sleep(0.5)
|
||||
return cv2.cvtColor(raw, cv2.COLOR_BGRA2BGR)
|
||||
|
||||
def _detect_entities(self, frame_bgr):
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user