-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBullets.py
More file actions
24 lines (17 loc) · 710 Bytes
/
Bullets.py
File metadata and controls
24 lines (17 loc) · 710 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env python
"""Bullets module: projectile entity."""
import pygame
from Constants import BULLET_WD_HT
__author__ = "Joshua Sonnenberg and Ethan Richardson"
class Bullets(pygame.Rect):
"""Represents a bullet projectile."""
def __init__(self, x: int, y: int, direction: str, surface: pygame.Surface) -> None:
"""Initialize a bullet.
Args:
x: The x-coordinate position.
y: The y-coordinate position.
direction: The direction the bullet is traveling.
surface: The pygame surface to draw on.
"""
super(Bullets, self).__init__(x, y, BULLET_WD_HT, BULLET_WD_HT)
self.direction = direction