(Underdepths) Pass 4
This commit is contained in:
29 files changed
+4888
No files matched your search
@@ -0,0 +1,18 @@
|
||||
"""Base entity: a thing with a position on the map."""
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass
|
||||
|
||||
|
||||
@dataclass(slots=True)
|
||||
class Entity:
|
||||
"""Anything that lives on a dungeon tile: player, enemies, items, stairs.
|
||||
|
||||
`sprite_key` names the procedural pixel-art sprite to rasterize for it.
|
||||
`blocks` is True when other entities cannot share its tile.
|
||||
"""
|
||||
x: int
|
||||
y: int
|
||||
name: str
|
||||
sprite_key: str
|
||||
blocks: bool = True
|
||||
Reference in new issue
Block a user