Interact with items

This commit is contained in:
Yohann D'ANELLO
2020-11-11 16:47:19 +01:00
parent 2b5d82db57
commit f11fb31c28
3 changed files with 35 additions and 9 deletions

View File

@ -192,6 +192,13 @@ class Entity:
"""
return sqrt(self.distance_squared(other))
def is_fighting_entity(self) -> bool:
return isinstance(self, FightingEntity)
def is_item(self) -> bool:
from dungeonbattle.entities.items import Item
return isinstance(self, Item)
@staticmethod
def get_all_entity_classes():
from dungeonbattle.entities.items import Heart, Bomb