1
0
python-roguelike/components/base_component.py

16 lines
305 B
Python
Raw Normal View History

2022-01-07 16:39:37 -05:00
from __future__ import annotations
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from engine import Engine
from entity import Entity
class BaseComponent:
entity: Entity # Owning entity instance
@property
def engine(self) -> Engine:
return self.entity.gamemap.engine