Added player collision detect
This commit is contained in:
@@ -4,10 +4,10 @@ class GameObject(object):
|
||||
objects = list()
|
||||
def __init__(self, name, pos_x, pos_y, width, height, image=None) -> None:
|
||||
self.name = name
|
||||
self.pos_x = pos_x
|
||||
self.pos_y = pos_y
|
||||
self.width = width
|
||||
self.height = height
|
||||
self.pos_x:int = pos_x
|
||||
self.pos_y:int = pos_y
|
||||
self.width:int = width
|
||||
self.height:int = height
|
||||
self.image = image
|
||||
self.rect:pygame.Rect
|
||||
self.objects.append(self)
|
||||
@@ -149,6 +149,10 @@ class Enemy(GameObject):
|
||||
if(y != 0):
|
||||
self.pos_y += y
|
||||
|
||||
|
||||
def movementqueue_run(self):
|
||||
pass
|
||||
|
||||
class Projectile(GameObject):
|
||||
shots = list()
|
||||
_id_count = 0
|
||||
|
||||
Reference in New Issue
Block a user