mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-21 14:30:27 +00:00
Unwrap env to access viewer
This commit is contained in:
@@ -34,8 +34,8 @@ def key_release(key, mod):
|
|||||||
human_agent_action = 0
|
human_agent_action = 0
|
||||||
|
|
||||||
env.render()
|
env.render()
|
||||||
env.viewer.window.on_key_press = key_press
|
env.unwrapped.viewer.window.on_key_press = key_press
|
||||||
env.viewer.window.on_key_release = key_release
|
env.unwrapped.viewer.window.on_key_release = key_release
|
||||||
|
|
||||||
def rollout(env):
|
def rollout(env):
|
||||||
global human_agent_action, human_wants_restart, human_sets_pause
|
global human_agent_action, human_wants_restart, human_sets_pause
|
||||||
|
Reference in New Issue
Block a user