def getactors(tag=None):
if tag is not None:
if tag in game_info.tagged_actors:
return game_info.tagged_actors[tag]
else:
print('DEBUG: tag not in dictionary')
return []
else:
return ACTORS
# tagged_actors_list = []
# for obj in gc.get_objects():
# if isinstance(obj, Actor):
# if tag is None:
# tagged_actors_list.append(obj)
# elif tag is str:
# if tag in obj.tags:
# tagged_actors_list.append(obj)
# return tagged_actors_list
评论列表
文章目录