Overflown/gamedata/objects/combat/ennemies/crate.py
2021-11-17 16:14:29 +01:00

20 lines
571 B
Python

from gamedata.objects.combat.ennemies.ennemy import Ennemy
class Crate(Ennemy):
def __init__(self,x,y,game,nodes=None):
super().__init__(x,y,game,nodes)
self.sprite = game.sprite_lib["crate/crate.png"]
self.deadsprite = game.sprite_lib["crate/broke.png"]
self.rect[2],self.rect[3] = self.sprite.get_size()
def step(self):
super().step()
def draw(self):
if not self.dead:
self.game.window.blit(self.sprite,[self.rect[0]-self.game.globals["camerax"],self.rect[1]-self.game.globals["cameray"]])