예제 #1
0
# -*- coding: utf-8 -*-

from pytower.menus import Menus
from multiprocessing import Queue

sq = Queue()
rq = Queue()

menus = Menus( 'qt', sq, rq )
menus.main_menu()
menus.in_game_menu()
menus.join()

try:
	while True:
		print rq.get_nowait()
except:
	print "All Done"
예제 #2
0
파일: pyTower.py 프로젝트: jmhobbs/pyTower
		if file == 'map.yaml':
			import_path = root.replace( '/', '.' ) + '.map'
			f = open( root + '/' + file )
			map_yaml = yaml.load( f )
			f.close()
			# TODO: Version checking
			map = Map( map_yaml, import_path, FullPath( root ) )
			maps.append( map )
			maps_min.append( map.name )

window.set_loading( 'Spawning Menu' )

tx = Queue()
rx = Queue()

menus = Menus( 'qt', tx, rx )

tx.put_nowait( messages.Message( messages.MAPS, {'maps': maps_min } ) )
menus.main_menu()

game = Game()

window.set_loading( 'Ready!' )

while True:

	# Only redraw if we have to...
	for event in pygame.event.get():
		if event.type == pygame.VIDEOEXPOSE:
			window.update()
		elif event.type == pygame.QUIT: