From 840e1d0b78194a65cad2368783c178e4633a942e Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Tue, 19 May 2015 12:17:27 +0100 Subject: [PATCH] updated texture code and lives --- target.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/target.py b/target.py index ab8afe8..44f913c 100644 --- a/target.py +++ b/target.py @@ -8,11 +8,14 @@ class Target(pygame.sprite.Sprite): super().__init__() self.width = width self.height = height - self.image = pygame.transform.scale(textures.get_target_texture(), (self.width, self.height)) + self.textures = textures + self.default_texture = textures.get_target_texture() + self.image = pygame.transform.scale(self.default_texture[0], (self.width, self.height)) self.rect = self.image.get_rect() self.speed = 5 self.rect.x, self.rect.y = (x+(self.width/2)),(y+(self.width/2)) # centres co-ordinates self.type = "NORMAL" + self.lives = 1 def move(self): self.rect.x += self.speed @@ -27,7 +30,6 @@ class Target(pygame.sprite.Sprite): else: self.rect.x, self.rect.y = x, y - def generate_targets(player, window_size, Levels): sprite_list = [] group = pygame.sprite.Group()