Пример #1
0
def destroy(state):
    screen.destroy(state)
    texture_db.destroy(state)
    tiles.destroy(state)
    sprites.destroy(state)
    movers.destroy(state)
    entities.destroy(state)
    view.destroy(state)
    controls.destroy(state)
    collisions.destroy(state)
    text.destroy(state)
    timer.destroy(state)
Пример #2
0
def destroy(state):
        screen.destroy(state)
        texture_db.destroy(state)
        tiles.destroy(state)
        sprites.destroy(state)
        movers.destroy(state)
        entities.destroy(state)
        view.destroy(state)
        controls.destroy(state)
        collisions.destroy(state)
        text.destroy(state)
        timer.destroy(state)
Пример #3
0
 def autoconnect(self):
   # index all connection views by source and sink
   connection_map = dict()
   connection_views = set(self.connection_layer.childItems())
   for view in connection_views:
     try:
       source = view.source_view.target
     except AttributeError:
       source = None
     try:
       sink = view.sink_view.target
     except AttributeError:
       sink = None
     if ((source is not None) and (sink is not None)):
       connection_map[(source, sink)] = view
   # create maps of input and output views only if needed
   input_map = None
   output_map = None
   # find unconnected connections
   for conn in self.patch_bay:
     # if either end of the connection is missing, it's not valid
     if ((conn.source is None) or (conn.sink is None)): continue
     # skip connections we already have views for, and remove them 
     #  from the list so we know which views have no connection in 
     #  the patch bay
     if ((conn.source, conn.sink) in connection_map):
       view = connection_map[(conn.source, conn.sink)]
       if (view in connection_views):
         connection_views.remove(view)
       continue
     # index all port views by target
     if ((input_map is None) or (output_map is None)):
       input_map = dict()
       output_map = dict()
       self._index_port_views(self, input_map, output_map)
     # see if we have views for the source and sink
     if ((conn.source in output_map) and (conn.sink in input_map)):
       source_view = output_map[conn.source]
       sink_view = input_map[conn.sink]
       view = ConnectionView(conn, parent=self.connection_layer)
       view.source_view = source_view
       view.sink_view = sink_view
       # add it to the map so we don't do this twice when given a 
       #  double connection
       connection_map[(conn.source, conn.sink)] = view
   # remove all connection views with no connection in the patch bay
   for view in connection_views:
     view.destroy()
Пример #4
0
def destroy(state):
        """
        TODO
        """
        screen.destroy(state)
        texture_db.destroy(state)
        tiles.destroy(state)
        sprites.destroy(state)
        movers.destroy(state)
        entities.destroy(state)
        view.destroy(state)
        controls.destroy(state)
        collisions.destroy(state)
        text.destroy(state)
        timer.destroy(state)
        debug.destroy(state)
        user.destroy(state)
Пример #5
0
def destroy(state):
    """
        TODO
        """
    screen.destroy(state)
    texture_db.destroy(state)
    tiles.destroy(state)
    sprites.destroy(state)
    movers.destroy(state)
    entities.destroy(state)
    view.destroy(state)
    controls.destroy(state)
    collisions.destroy(state)
    text.destroy(state)
    timer.destroy(state)
    debug.destroy(state)
    user.destroy(state)