move_obj func was added to Map class. Also console now can execute any command with exec.
This commit is contained in:
@@ -7,6 +7,9 @@ class Object:
|
||||
sprite_name: str
|
||||
sprite_state: int = 0
|
||||
|
||||
# weight
|
||||
# effects = {}
|
||||
|
||||
def draw(self, draw_data):
|
||||
if draw_data["spr_up"] == 0:
|
||||
if self.sprite_state == len(draw_data["sprites"][self.sprite_name]) - 1:
|
||||
@@ -18,23 +21,36 @@ class Object:
|
||||
rect = sp.get_rect(center = (draw_data["x"] + draw_data["w"] /2, draw_data["y"] + draw_data["h"]/ 2))
|
||||
draw_data["screen"].blit(sp, rect)
|
||||
|
||||
|
||||
def update(self):
|
||||
pass
|
||||
|
||||
@dataclass
|
||||
class Terrain(Object):
|
||||
pass
|
||||
|
||||
@dataclass
|
||||
class Creature(Object):
|
||||
pass
|
||||
#status
|
||||
#actions
|
||||
#tasks
|
||||
#items
|
||||
current_action: int = 0
|
||||
quick_actions: list = field(default_factory = list)
|
||||
tasks: list = field(default_factory = list)
|
||||
inventory: dict = field(default_factory = dict)
|
||||
|
||||
def update(self):
|
||||
pass
|
||||
|
||||
|
||||
@dataclass
|
||||
class Item(Object):
|
||||
# passive_abilities = {}
|
||||
# active_abilities = {}
|
||||
pass
|
||||
|
||||
@dataclass
|
||||
class Container(Item):
|
||||
# content = {}
|
||||
pass
|
||||
|
||||
|
||||
@dataclass
|
||||
class Building(Object):
|
||||
pass
|
||||
Reference in New Issue
Block a user