pymasep.interface.interface_state
Classes
This class implements the concept (pretty much) of Game State for the interface |
Module Contents
- class pymasep.interface.interface_state.InterfaceState(sub_application, container_dim=(100, 100))
Bases:
pymasep.application.sub_app_state.SubAppStateThis class implements the concept (pretty much) of Game State for the interface
- Parameters:
sub_application – the sub application where the state is defined
container_dim – pygame_ui general container dimension (in pixel)
- ui_container = None
pygame_gui container that include all pygame_gui elements for the state
- container_dim
dimension of the pygame_gui container
- init()
Initialisation of the state
- Return type:
None
- clean()
The state is destroyed. Clean all elements of the state (including ui_container)
- Return type:
None
- pause()
Pause the state. Change the ui_container display
- Return type:
None
- abstract handle_event(event)
Handle events in the state
- Parameters:
event – The event to handle
- Return type:
None
- update()
The update phase of the state. For interface, it corresponds to choose action, send action and receive observation.
- Return type:
None
- render(time_delta)
The render part : how to display the state
- Return type:
None
- on_receive_observation()
Callback when the interface receives an observation
- Return type:
None