mini_arcade_core.engine.animation ================================= .. py:module:: mini_arcade_core.engine.animation .. autoapi-nested-parse:: Animation module for handling frame-based animations in the mini arcade engine. Attributes ---------- .. autoapisummary:: mini_arcade_core.engine.animation.TFrame Classes ------- .. autoapisummary:: mini_arcade_core.engine.animation.Animation Module Contents --------------- .. py:data:: TFrame .. py:class:: Animation Bases: :py:obj:`Generic`\ [\ :py:obj:`TFrame`\ ] Simple animation class that cycles through frames at a specified FPS. :ivar frames (Sequence[TFrame]): The frames of the animation. :ivar fps (float): Frames per second for the animation. :ivar loop (bool): Whether the animation should loop. :ivar time (float): Internal timer to track frame changes. :ivar index (int): Current frame index. .. py:attribute:: frames :type: Sequence[TFrame] .. py:attribute:: fps :type: float :value: 10.0 .. py:attribute:: loop :type: bool :value: True .. py:attribute:: time :type: float :value: 0.0 .. py:attribute:: index :type: int :value: 0 .. py:method:: update(dt: float) -> None Update the animation based on the elapsed time. :param dt: Time elapsed since the last update (in seconds). :type dt: float .. py:property:: current_frame :type: TFrame Get the current frame of the animation. :return: The current frame. :rtype: TFrame