Changement de la manière de charcher les textures #27

Merged
tipragot merged 2 commits from image-loading into main 2023-10-29 11:05:06 +00:00
Showing only changes of commit 7f720204d9 - Show all commits

View file

@ -304,7 +304,7 @@ class Assets:
La texture qui correspond au nom *name*.
"""
if name.startswith("animations/"):
return pygame.image.load(name)
return pygame.image.load(f"assets/textures/{name}")
return self.__textures.get(name, self.__error_texture)
def get_texture_size(self, name: str) -> Vec2: