Interact with items
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user