добаивл gey menu
This commit is contained in:
@@ -1,7 +1,18 @@
|
|||||||
|
import pygame
|
||||||
from modules.Game import Game
|
from modules.Game import Game
|
||||||
|
from modules.GameMenu import menu
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
running = True
|
||||||
|
show_menu = True
|
||||||
|
while running:
|
||||||
|
if show_menu:
|
||||||
|
menu()
|
||||||
|
show_menu = False
|
||||||
|
else:
|
||||||
|
running = False
|
||||||
|
pygame.display.flip()
|
||||||
game = Game()
|
game = Game()
|
||||||
game.start()
|
game.start()
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
import sys
|
||||||
|
from pygame import *
|
||||||
|
|
||||||
|
|
||||||
|
def menu():
|
||||||
|
init()
|
||||||
|
DISPLAYSURF = display.set_mode((480, 600))
|
||||||
|
display.set_caption('The Lonely Shooter')
|
||||||
|
background = image.load('styles/background.jpeg').convert()
|
||||||
|
DISPLAYSURF.blit(background, background.get_rect())
|
||||||
|
display.update()
|
||||||
|
while True:
|
||||||
|
events = event.poll()
|
||||||
|
if events.type == KEYDOWN and events.key == K_RETURN:
|
||||||
|
break
|
||||||
|
elif events.type == QUIT:
|
||||||
|
sys.exit()
|
||||||
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 127 KiB |
Reference in New Issue
Block a user