State

class game_state.State

The State class which works as an individual screen.

Attributes:
window: pygame.Surface

The main game window.

manager: StateManager

The manager to which the state is binded to.

clock: pygame.time.Clock

Pygame’s clock.

run()

The main game loop method to be executed by the StateManager.

Return type:

None

setup()

This method is only called once before State.run, i.e right after the class has been instantiated inside the StateManager. This method will never be called ever again when changing / resetting States.

Return type:

None