Système d'animations #22

Merged
tipragot merged 3 commits from animations into main 2023-10-27 16:20:43 +00:00
Showing only changes of commit 9963e94897 - Show all commits

View file

@ -0,0 +1,33 @@
"""
Définit un plugin qui permet d'afficher des animations.
"""
from engine import *
class AnimationPlugin(Plugin):
"""
Plugin qui permet d'afficher des animations.
"""
def apply(self, game: Game) -> None:
"""
Applique le plugin a un jeu.
Paramètres:
game: Le jeu auquel appliquer le plugin.
"""
pass
class AnimatedSprite:
"""
Composant qui represente un sprite animé.
"""
def __init__(
self, images_folder: str, frame_count: int, frame_duration: float
) -> None:
self.images_folder = images_folder
self.frame_count = frame_count
self.frame_duration = frame_duration