You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
502 B

from dinosaur import *
class Bullet:
def __init__(self, game_speed, dinosaur):
self.game_speed = game_speed
self.image = BULLET
self.rect = self.image.get_rect()
self.rect.x = dinosaur.dino_rect.x + dinosaur.dino_rect[2] + 10
self.rect.y = dinosaur.dino_rect.y + dinosaur.dino_rect[3] / 2
def update(self):
self.rect.x += self.game_speed
def draw(self, SCREEN):
SCREEN.blit(self.image, (self.rect.x, self.rect.y))