def __init__(self, img, speed): pygame.sprite.Sprite.__init__(self) self.speed = speed self.image = Imagem.load_image(img, 1) self.rect = self.image.get_rect() self._tiros = 0 self._acertos = 0 self._pontos = 0 self._highscore = 0 self._municao = 100 self._delay = 15 # Delay de cada tiro self.municoes_list = pygame.sprite.Group()
def set_imagem(self, img): self.image = Imagem.load_image(img, 1) self.rect = self.image.get_rect() self.rect.x = 500 self.rect.y = random.randint(25, 450)
def __init__(self): self.loading = Imagem.load_image('carregando.png', 0) self.fonte_error = pygame.font.SysFont("comicsansms", 16) self.error = self.fonte_error.render("", 1, (255, 0, 0)) self.waiting = 0
def set_imagem(self, img): self.image = Imagem.load_image(img, 1) self.rect = self.image.get_rect()
def set_imagem(self, img): self.image = Imagem.load_image(img, 1) self.rect = self.image.get_rect() self.rect.x = 500 self.rect.y = random.randint(25,450)