Beispiel #1
0
 def register_mandatory_components(self):
     """Registers the mandatory components"""
     if not Agent.registered_as:
         Agent.register()
     if not FifeAgent.registered_as:
         FifeAgent.register()
     if not General.registered_as:
         General.register()
Beispiel #2
0
 def __init__(self, fife_map, name, camera, regions, application):
     self.__map = fife_map
     self.__name = name
     self.__regions = regions
     self.__entities = {}
     self.__camera = fife_map.getCamera(camera)
     self.__application = application
     if not FifeAgent.registered_as:
         FifeAgent.register()
     if not Agent.registered_as:
         Agent.register()
     if not General.registered_as:
         General.register()
Beispiel #3
0
 def __init__(self, application):
     self.application = application
     self.object_db = {}
     GameVariables.add_callback(self.update_game_variables)
     if not Agent.registered_as:
         Agent.register()
     if not FifeAgent.registered_as:
         FifeAgent.register()
     if not General.registered_as:
         General.register()
     yaml.add_representer(RPGEntity, self.entity_representer)
     yaml.add_constructor('!Entity', self.entity_constructor,
                          yaml.SafeLoader)
     World.__init__(self, application.engine)
Beispiel #4
0
 def __init__(self, fife_map_or_filename, view_name, camera, regions,
              application):
     self.__map = fife_map_or_filename
     self.__camera = camera
     if self.is_loaded:
         self.__setup_map_data()
     self.__view_name = view_name
     self.__regions = regions
     self.__entities = {}
     self.__application = application
     if not FifeAgent.registered_as:
         FifeAgent.register()
     if not Agent.registered_as:
         Agent.register()
     if not General.registered_as:
         General.register()