tuxemon.states.transition.flash module
- class tuxemon.states.transition.flash.FlashTransition[source]
Bases:
State
The state responsible for the battle transitions.
- draw(surface)[source]
Render the state to the surface passed. Must be overloaded in children.
Do not change the state of any game entities. Every draw should be the same for a given game time. Any game changes should be done during update.
- Parameters:
surface (Surface) – Surface to be rendered onto.
- Return type:
None
- force_draw = True
- process_event(event)[source]
Handles player input events.
This function is only called when the player provides input such as pressing a key or clicking the mouse.
Since this is part of a chain of event handlers, the return value from this method becomes input for the next one. Returning None signifies that this method has dealt with an event and wants it exclusively. Return the event and others can use it as well.
You should return None if you have handled input here.
- Parameters:
event (PlayerInput) – Player input event.
- Returns:
None
if the event should not be passed to the next handlers. Otherwise, return the input event.- Return type:
PlayerInput | None
- resume()[source]
Called before update when state is newly in focus.
This will be called: * after startup and before next update * after a pop operation which causes this state to be in focus
After being called, state will begin to receive player input. Could be called several times over lifetime of state.
Example uses: starting music, open menu, starting animations, timers, etc.
- Return type:
None
- sprites: SpriteGroup[Sprite]