示例#1
0
def MainLoop():
    # =============================================================================
    # Start the mainloop (and possible other threads)
    # =============================================================================
    splash.show()
    plugin.init()
    stack.init()
    sim.start()
    scr.init()

    # Main loop for tmx object
    while not sim.mode == sim.end:
        sim.update()   # Update sim
        scr.update()   # GUI update

        # Restart traffic simulation:
        if sim.mode == sim.init:
            sim.reset()
            scr.objdel()     # Delete user defined objects

    # After the simulation is done, close the gui
    sim.stop()
    pg.quit()
    print 'BlueSky normal end.'
    return
示例#2
0
def MainLoop():
    # =============================================================================
    # Start the mainloop (and possible other threads)
    # =============================================================================
    splash.show()
    plugin.init()
    stack.init()
    sim.start()
    scr.init()

    # Main loop for tmx object
    while not sim.mode == sim.end:
        sim.update()   # Update sim
        scr.update()   # GUI update

        # Restart traffic simulation:
        if sim.mode == sim.init:
            sim.reset()
            scr.objdel()     # Delete user defined objects

    # After the simulation is done, close the gui
    sim.stop()
    pg.quit()
    print('BlueSky normal end.')
    return
示例#3
0
def start():
    """ Start the mainloop (and possible other threads) """
    splash.show()
    bs.init()
    bs.sim.operate()
    bs.scr.init()

    # Main loop for tmx object
    while not bs.sim.mode == bs.sim.end:
        bs.sim.update()  # Update sim
        bs.scr.update()  # GUI update

        # Restart traffic simulation:
        if bs.sim.mode == bs.sim.init:
            bs.sim.reset()
            bs.scr.objdel()  # Delete user defined objects
示例#4
0
def main():
    """ Start the mainloop (and possible other threads) """
    splash.show()
    bs.init(pygame=True)
    # bs.sim.op()
    bs.scr.init()

    # Main loop for BlueSky
    while not bs.sim.state == bs.END:
        bs.sim.step()   # Update sim
        bs.scr.update()   # GUI update

    bs.sim.quit()
    pg.quit()

    print('BlueSky normal end.')
示例#5
0
def start():
    # =============================================================================
    # Start the mainloop (and possible other threads)
    # =============================================================================
    splash.show()
    bs.init()
    bs.sim.operate()
    bs.scr.init()

    # Main loop for tmx object
    while not bs.sim.mode == bs.sim.end:
        bs.sim.update()   # Update sim
        bs.scr.update()   # GUI update

        # Restart traffic simulation:
        if bs.sim.mode == bs.sim.init:
            bs.sim.reset()
            bs.scr.objdel()     # Delete user defined objects
示例#6
0
def main():
    """ Start the mainloop (and possible other threads) """
    splash.show()
    bs.init(pygame=True)
    bs.sim.operate()
    bs.scr.init()

    # Main loop for BlueSky
    while not bs.sim.mode == bs.sim.end:
        bs.sim.update()   # Update sim
        bs.scr.update()   # GUI update

        # Restart traffic simulation:
        if bs.sim.mode == bs.sim.init:
            bs.sim.reset()
            bs.scr.objdel()     # Delete user defined objects

    bs.sim.stop()
    pg.quit()

    print('BlueSky normal end.')
示例#7
0
def main():
    """ Start the mainloop (and possible other threads) """
    splash.show()
    bs.init(pygame=True)
    bs.sim.operate()
    bs.scr.init()

    # Main loop for BlueSky
    while not bs.sim.mode == bs.sim.end:
        bs.sim.update()  # Update sim
        bs.scr.update()  # GUI update

        # Restart traffic simulation:
        if bs.sim.mode == bs.sim.init:
            bs.sim.reset()
            bs.scr.objdel()  # Delete user defined objects

    bs.sim.stop()
    pg.quit()

    print('BlueSky normal end.')
示例#8
0
def main_loop():
    # =============================================================================
    # Start the mainloop (and possible other threads)
    # =============================================================================
    splash.show()
    bs.init()
    bs.sim.start()
    bs.scr.init()

    # Main loop for tmx object
    while not bs.sim.mode == bs.sim.end:
        bs.sim.update()  # Update sim
        bs.scr.update()  # GUI update

        # Restart traffic simulation:
        if bs.sim.mode == bs.sim.init:
            bs.sim.reset()
            bs.scr.objdel()  # Delete user defined objects

    # After the simulation is done, close the gui
    bs.sim.stop()
    pg.quit()
    print('BlueSky normal end.')
    return