1
Fork 0

updated texture code

This commit is contained in:
Jake Howard 2015-05-12 12:15:58 +01:00
parent a499534f11
commit e34503d2bc
2 changed files with 3 additions and 4 deletions

View file

@ -2,7 +2,7 @@ import pygame
class Bullet(pygame.sprite.Sprite): class Bullet(pygame.sprite.Sprite):
def __init__(self, parent): def __init__(self, parent, textures):
super().__init__() super().__init__()
self.width = 4 self.width = 4
self.height = 10 self.height = 10

View file

@ -7,7 +7,7 @@ class Shooter(pygame.sprite.Sprite):
self.width = width self.width = width
self.height = height self.height = height
self.colour = colour 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.rect = self.image.get_rect()
self.speed = 3 self.speed = 3
self.window_rect = window.get_rect() self.window_rect = window.get_rect()
@ -17,7 +17,6 @@ class Shooter(pygame.sprite.Sprite):
self.level = 0 self.level = 0
self.lives = 3 self.lives = 3
self.powerup = "" self.powerup = ""
self.colours = [(255,0,0), (255,255,0), (0,255,0)]
def set_position(self,x,y): def set_position(self,x,y):
self.rect.x, self.rect.y = x,y self.rect.x, self.rect.y = x,y