Beispiel #1
0
 def __init__(self, entity):
     self.entity = entity
     self.polygon = Polygon.rectangular_polygon(64, 64)
     self.points = [
         self.entity.position + point
         for point in self.polygon.get_points()
     ]
Beispiel #2
0
    def __init__(self, planner=None):
        self.entities = []
        self.obstacles = []
        self.planner = planner

        message_handlers = {
            MESSAGE_TYPE.CREATE_ENTITY: self.handle_create_entity,
            MESSAGE_TYPE.MOVE_ENTITY: self.handle_move_entity,
            MESSAGE_TYPE.INIT_MOVEMENT_PLANNER: self.handle_init_movement_planner,
        }

        self.agent_prototype = Polygon.rectangular_polygon(64, 64)

        super(MovementSystem, self).__init__(message_handlers)
Beispiel #3
0
 def __init__(self, shape_component):
     self.shape_component = shape_component
     self.font = pygame.font.Font(None, 15)
     self.agent_prototype = Polygon.rectangular_polygon(64, 64)
Beispiel #4
0
 def __init__(self, entity):
     self.entity = entity
     self.polygon = Polygon.rectangular_polygon(64, 64)
     self.points = [self.entity.position + point for point in self.polygon.get_points()]