1
Fork 0

Changed size of objects

This commit is contained in:
Jake Howard 2015-05-12 22:43:41 +01:00
parent 07ecced10b
commit 0bc944c284
3 changed files with 4 additions and 4 deletions

View File

@ -4,8 +4,8 @@ import pygame
class Bullet(pygame.sprite.Sprite): class Bullet(pygame.sprite.Sprite):
def __init__(self, parent, textures): def __init__(self, parent, textures):
super().__init__() super().__init__()
self.width = 4 self.width = 6
self.height = 10 self.height = 14
self.image = pygame.transform.scale(textures.get_texture("BULLET"), (self.width, self.height)) self.image = pygame.transform.scale(textures.get_texture("BULLET"), (self.width, self.height))
self.rect = self.image.get_rect() self.rect = self.image.get_rect()
self.rect.x = parent.rect.x + parent.width/2 - self.width/2 self.rect.x = parent.rect.x + parent.width/2 - self.width/2

View File

@ -2,7 +2,7 @@ import pygame
class Shooter(pygame.sprite.Sprite): class Shooter(pygame.sprite.Sprite):
def __init__(self, window, texture, colour=(255,255,255), width=45, height=20): def __init__(self, window, texture, colour=(255,255,255), width=55, height=25):
super().__init__() super().__init__()
self.width = width self.width = width
self.height = height self.height = height

View File

@ -3,7 +3,7 @@ from random import randint
class Target(pygame.sprite.Sprite): class Target(pygame.sprite.Sprite):
def __init__(self, x, y, textures, color=(30,0,150), width=16, height=16): def __init__(self, x, y, textures, color=(30,0,150), width=23, height=23):
super().__init__() super().__init__()
self.width = width self.width = width
self.height = height self.height = height