Changed some classes
This commit is contained in:
20
Enemy.py
20
Enemy.py
@@ -2,16 +2,12 @@ import pygame
|
||||
import GameObject
|
||||
import Utils
|
||||
|
||||
class Enemy(object):
|
||||
def __init__(self, name, pos_x, pos_y, image) -> None:
|
||||
spawned_enemy = list()
|
||||
self.name = name
|
||||
self.image = image
|
||||
self.pos_x = pos_x
|
||||
self.pos_y = pos_y
|
||||
self.obj = GameObject.GameObject("Enemy", 0, 0, image)
|
||||
pass
|
||||
class Enemy(GameObject.GameObject):
|
||||
def __init__(self, name, pos_x, pos_y, width, height, image=None) -> None:
|
||||
super().__init__(name, pos_x, pos_y, width, height, image)
|
||||
|
||||
def render(self, screen:pygame.Surface):
|
||||
screen.blit(self.image, (self.pos_x, self.pos_y))
|
||||
|
||||
|
||||
|
||||
|
||||
#def render(self):
|
||||
# pass
|
||||
Reference in New Issue
Block a user