tuxemon.states.transition.flash module

class tuxemon.states.transition.flash.FlashTransition[source]

Bases: State

The state responsible for the battle transitions.


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.


surface (Surface) – Surface to be rendered onto.

Return type:


force_draw = True

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.


event (PlayerInput) – Player input event.


None if the event should not be passed to the next handlers. Otherwise, return the input event.

Return type:

PlayerInput | None


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:


sprites: SpriteGroup[Sprite]

Update function for state.


time_delta (float) – Time since last update in seconds

Return type: