-
Notifications
You must be signed in to change notification settings - Fork 240
/
BlueSky_pygame.py
31 lines (24 loc) · 754 Bytes
/
BlueSky_pygame.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env python
""" Pygame BlueSky start script """
from __future__ import print_function
import pygame as pg
import bluesky as bs
from bluesky.ui.pygame import splash
def main():
""" Start the mainloop (and possible other threads) """
splash.show()
bs.init(gui='pygame')
# bs.sim.op()
bs.scr.init()
# Main loop for BlueSky
while not bs.sim.state == bs.END:
bs.sim.update() # Update sim
bs.scr.update() # GUI update
bs.sim.quit()
pg.quit()
print('BlueSky normal end.')
if __name__ == '__main__':
print(" ***** BlueSky Open ATM simulator *****")
print("Distributed under GNU General Public License v3")
# Run mainloop if BlueSky_pygame is called directly
main()