|
|
@ -12,6 +12,7 @@ class Bullet: |
|
|
|
self.bullet_width = 4 |
|
|
|
self.bullet_width = 4 |
|
|
|
self.bullet_height = 12 |
|
|
|
self.bullet_height = 12 |
|
|
|
self.bullet_vel = random.randint(16,28) #12 -- 22 |
|
|
|
self.bullet_vel = random.randint(16,28) #12 -- 22 |
|
|
|
|
|
|
|
self.bullet_rect = pygame.Rect(self.bullet_x,self.bullet_y, self.bullet_width,self.bullet_height) |
|
|
|
def draw(self,window,start_color,bullet_image): |
|
|
|
def draw(self,window,start_color,bullet_image): |
|
|
|
self.rect = pygame.draw.rect(window,start_color,(self.bullet_x,self.bullet_y,self.bullet_width,self.bullet_height)) |
|
|
|
self.rect = pygame.draw.rect(window,start_color,(self.bullet_x,self.bullet_y,self.bullet_width,self.bullet_height)) |
|
|
|
window.blit(bullet_image,(self.bullet_x, self.bullet_y)) |
|
|
|
window.blit(bullet_image,(self.bullet_x, self.bullet_y)) |
|
|
|