roguepy/entity.py

24 lines
445 B
Python
Raw Normal View History

2023-03-01 19:47:24 +00:00
from enum import Enum
2023-03-02 16:51:17 +00:00
from actions import Action, Idle, NA
2023-03-01 19:47:24 +00:00
class Entity():
pass
class Item(Entity):
pass
class Character(Entity):
def __init__(self):
2023-03-02 16:51:17 +00:00
self.speed = 1
self.action: Action = NA()
2023-03-01 19:47:24 +00:00
class Player(Character):
def __init__(self):
super().__init__()
class Enemy(Character):
def __init__(self):
2023-03-02 16:51:17 +00:00
super().__init__()
def calculate_action(self):
self.action: Action = Idle()