示例#1
0
def setup_main_menu():
	global MENU
	
	events.register_event('input', control)
	events.register_event('loop', battlefield.loop_attract)
	events.register_event('camera', action_camera)
	battlefield.create(player=False)
	display.create_text_group('logo')
	display.create_text_group('menu')
	
	MENU = [{'text': 'Planet', 'callback': start_planet},
	        {'text': 'Arena', 'callback': weapon_selection},
	        {'text': 'Quit', 'callback': shutdown}]
	
	display.print_text(display.get_window_size()[0]/2,
	                   display.get_window_size()[1]*.8,
	                   'VECTOR:KILL',
	                   color=(0, 255, 0, 100),
	                   font_name='Thin Design',
	                   font_size=42,
	                   center=True,
	                   show_for=-1,
	                   text_group='logo')
	
	display.print_text(display.get_window_size()[0]/2,
	                   display.get_window_size()[1]*.20,
	                   'Next unlock:',
	                   text_group='bot_center',
	                   color=(238, 221, 130, 255),
	                   show_for=-1,
	                   center=True)
	
	display.print_text(display.get_window_size()[0]/2,
	                   display.get_window_size()[1]*.15,
	                   'Ivan\'s Chaingun',
	                   text_group='bot_center',
	                   color=(255, 215, 0, 255),
	                   show_for=-1,
	                   center=True)
	
	draw_menu()
示例#2
0
def boot():
    display.create_sprite_group('effects_background_bottom')
    display.create_sprite_group('effects_background')
    display.create_sprite_group('items')
    display.create_sprite_group('ships')
    display.create_sprite_group('effects_foreground')
    display.create_text_group('bot_center')

    entities.create_entity_group('items')
    entities.create_entity_group('players')
    entities.create_entity_group('enemies')
    entities.create_entity_group('hazards')
    entities.create_entity_group('effects')
    entities.create_entity_group('bullets')
    entities.create_entity_group('weapons')
    entities.create_entity_group('planets')

    entities.create_entity_group('cursor')
    entities.create_entity_group('tiles_foreground')
    display.create_sprite_group('tiles_foreground')
    display.create_sprite_group('ui_foreground')
示例#3
0
def boot():
	display.create_sprite_group('effects_background_bottom')
	display.create_sprite_group('effects_background')
	display.create_sprite_group('items')
	display.create_sprite_group('ships')
	display.create_sprite_group('effects_foreground')
	display.create_text_group('bot_center')
	
	entities.create_entity_group('items')
	entities.create_entity_group('players')
	entities.create_entity_group('enemies')
	entities.create_entity_group('hazards')
	entities.create_entity_group('effects')
	entities.create_entity_group('bullets')
	entities.create_entity_group('weapons')
	entities.create_entity_group('planets')
	
	entities.create_entity_group('cursor')
	entities.create_entity_group('tiles_foreground')
	display.create_sprite_group('tiles_foreground')
	display.create_sprite_group('ui_foreground')