forked from InfoProjekt/game
Compare commits
No commits in common. "01c3aeae4a3ca7895963290a29eaa93832956367" and "3fe22ff6acbed8a6d00f6c8c88f70a144bbada66" have entirely different histories.
01c3aeae4a
...
3fe22ff6ac
2 changed files with 2 additions and 11 deletions
13
classes.py
13
classes.py
|
|
@ -227,7 +227,7 @@ class Stage(GameObjects):
|
|||
self.current += 1
|
||||
if self.current >= len(self.rooms):
|
||||
return 1
|
||||
|
||||
|
||||
def draw(self, screen):
|
||||
for room in self.rooms:
|
||||
if room.id == self.current:
|
||||
|
|
@ -291,14 +291,5 @@ class Obstacle(GameObjects):
|
|||
else:
|
||||
pygame.draw.rect(screen, '#e7f8e0', self.rect, 2)
|
||||
|
||||
class Door(GameObjects):
|
||||
def __init__(self, name: str, _type: str, bg, objects: list, WIDTH, HEIGHT, x: int, y: int, islocked=True) -> None:
|
||||
super().__init__(name, _type, bg, objects, WIDTH, HEIGHT)
|
||||
self.rect = pygame.Rect((x, y), self.background.get_size())
|
||||
self.locked = islocked
|
||||
|
||||
def draw(self, screen):
|
||||
screen.blit(self.background, self.rect)
|
||||
|
||||
def update(self, islocked=True):
|
||||
self.locked = islocked
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue