From e34503d2bc2f873bb7e9ff2595195bfd2e9f65b7 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Tue, 12 May 2015 12:15:58 +0100 Subject: [PATCH] updated texture code --- bullet.py | 2 +- player.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/bullet.py b/bullet.py index dbd7e92..94ec4fc 100644 --- a/bullet.py +++ b/bullet.py @@ -2,7 +2,7 @@ import pygame class Bullet(pygame.sprite.Sprite): - def __init__(self, parent): + def __init__(self, parent, textures): super().__init__() self.width = 4 self.height = 10 diff --git a/player.py b/player.py index f6066fe..e78c68d 100644 --- a/player.py +++ b/player.py @@ -7,7 +7,7 @@ class Shooter(pygame.sprite.Sprite): self.width = width self.height = height self.colour = colour - self.image = pygame.transform.scale(textures.get_texture("PLAYER"), (self.width, self.height)) + self.image = pygame.transform.scale(texture.get_texture("PLAYER"), (self.width, self.height)) self.rect = self.image.get_rect() self.speed = 3 self.window_rect = window.get_rect() @@ -16,8 +16,7 @@ class Shooter(pygame.sprite.Sprite): self.OP = False self.level = 0 self.lives = 3 - self.powerup = "" - self.colours = [(255,0,0), (255,255,0), (0,255,0)] + self.powerup = "" def set_position(self,x,y): self.rect.x, self.rect.y = x,y