import pygame class BaseObject(): def __init__(self,x,y,game,w=10,h=10): self.rect = pygame.Rect([x,y,w,h]) self.baserect = self.rect.copy() self.game = game self.sprite = game.sprite_lib["icon.png"] self.spriteoffset = 0,0 self.depth = 1 # Sa "profondeur", déterminera l'odre d'affichage des objets def step(self): pass def draw(self): if self.sprite: self.game.window.blit(self.sprite,self.rect[:2])