New Szenario "Two_Rooms_One_Door"

This commit is contained in:
Steffen Illium
2023-07-12 15:59:21 +02:00
parent 836495a884
commit 9135a69da6
25 changed files with 223 additions and 45 deletions

View File

@ -10,3 +10,15 @@ class Zones(Objects):
def __init__(self, *args, **kwargs):
super(Zones, self).__init__(*args, can_collide=True, **kwargs)
def by_pos(self, pos):
return self.pos_dict[pos]
def notify_add_entity(self, entity: Zone):
self.pos_dict.update({key: [entity] for key in entity.positions})
return True
def notify_del_entity(self, entity: Zone):
for pos in entity.positions:
self.pos_dict[pos].remove(entity)
return True