Add a HostileEnemy AI component

This commit is contained in:
Eryn Wells 2022-05-08 09:48:22 -07:00
parent cf9ec2d17e
commit 49b48ec7a8

22
roguebasin/ai.py Normal file
View file

@ -0,0 +1,22 @@
# Eryn Wells <eryn@erynwells.me>
from typing import TYPE_CHECKING
from .actions import Action, WaitAction
from .components import Component
from .object import Entity
if TYPE_CHECKING:
from .engine import Engine
class AI(Component):
def __init__(self, entity: Entity) -> None:
super().__init__()
self.entity = entity
def act(self, engine: 'Engine') -> Action:
raise NotImplementedError()
class HostileEnemy(AI):
def act(self, engine: 'Engine') -> Action:
return WaitAction(self.entity)