Adding in bullets

This commit is contained in:
franky212
2024-10-28 21:10:08 -06:00
parent ae27a3c7a0
commit 48acf7759a
4 changed files with 32 additions and 1 deletions

13
shot.py Normal file
View File

@@ -0,0 +1,13 @@
import pygame
from circleshape import CircleShape
from constants import SHOT_RADIUS
class Shot(CircleShape):
def __init__(self, x, y, velocity):
super().__init__(x, y, SHOT_RADIUS)
self.velocity = velocity
def draw(self, screen):
pygame.draw.circle(screen, "white", self.position, self.radius, 2)
def update(self, dt):
self.position += (self.velocity * dt)