Files
asteroids/shot.py
T

15 lines
439 B
Python
Raw Normal View History

2026-05-22 09:34:56 -05:00
import pygame
from circleshape import CircleShape
from constants import LINE_WIDTH
class Shot(CircleShape):
def __init__(self, x: float, y: float, radius: float) -> None:
super().__init__(x, y, radius)
def draw(self, screen: pygame.Surface) -> None:
pygame.draw.circle(screen, "white", self.position, self.radius, LINE_WIDTH)
def update(self, dt: float) -> None:
self.position += self.velocity * dt