-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update, stairs now exist, and message handler for stairs works. Nothi…
…ng happens yet.
- Loading branch information
Showing
7 changed files
with
80 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import arcade | ||
from entities.entity import Entity | ||
|
||
|
||
class Stairs(Entity): | ||
def __init__(self, | ||
x: int = 0, | ||
y: int = 0, | ||
char: str = "X", | ||
color=arcade.csscolor.WHITE, | ||
visible_color=arcade.csscolor.WHITE, | ||
not_visible_color=arcade.csscolor.WHITE, | ||
name=None, | ||
blocks=False, | ||
fighter=None, | ||
ai=None, | ||
inventory=None, | ||
item=None, | ||
floor: int = 0): | ||
super().__init__(x, y, char, color, visible_color, not_visible_color, name, blocks, fighter, ai, inventory, item) | ||
self.floor = floor | ||
|
||
def get_dict(self): | ||
dict = super().get_dict() | ||
dict['floor'] = self.floor | ||
return dict | ||
|
||
def restore_from_dict(self, result): | ||
super().restore_from_dict(result) | ||
self.floor = result['floor'] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters