Adding Player, movement, and drawing/updating functionality

This commit is contained in:
franky212
2024-10-28 16:00:40 -06:00
parent 90d55e89b7
commit 0412b21bb0
5 changed files with 84 additions and 5 deletions

22
circleshape.py Normal file
View File

@@ -0,0 +1,22 @@
import pygame
# Base class for game objects
class CircleShape(pygame.sprite.Sprite):
def __init__(self, x, y, radius):
# we will be using this later
if hasattr(self, "containers"):
super().__init__(self.containers)
else:
super().__init__()
self.position = pygame.Vector2(x, y)
self.velocity = pygame.Vector2(0, 0)
self.radius = radius
def draw(self, screen):
# sub-classes must override
pass
def update(self, dt):
# sub-classes must override
pass