fard
This commit is contained in:
parent
48f8a66fd2
commit
51a0949467
32
src/main.py
32
src/main.py
@ -24,6 +24,14 @@ import os
|
||||
Variables
|
||||
'''
|
||||
# variables go here
|
||||
worldx = 960
|
||||
worldy = 720
|
||||
fps = 40
|
||||
ani = 4
|
||||
BLUE = (25, 25, 200)
|
||||
BLACK = (23, 23, 23)
|
||||
WHITE = (254, 254, 254)
|
||||
main = True
|
||||
# -----------------
|
||||
'''
|
||||
Objects
|
||||
@ -34,10 +42,34 @@ Objects
|
||||
Setup
|
||||
'''
|
||||
# run-once code goes here
|
||||
clock = pygame.time.Clock()
|
||||
pygame.init()
|
||||
world = pygame.display.set_mode([worldx,worldy])
|
||||
backdrop = pygame.image.load(os.path.join('stages','Untitled.png'))
|
||||
backdropbox = world.get_rect()
|
||||
# -----------------------
|
||||
'''
|
||||
Main Loop
|
||||
'''
|
||||
# main game loop goes here
|
||||
while main:
|
||||
for event in pygame.event.get():
|
||||
if event.type == pygame.QUIT:
|
||||
pygame.quit()
|
||||
try:
|
||||
sys.exit()
|
||||
finally:
|
||||
main = False
|
||||
|
||||
if event.type == pygame.KEYDOWN:
|
||||
if event.key == ord('q'):
|
||||
pygame.quit()
|
||||
try:
|
||||
sys.exit()
|
||||
finally:
|
||||
main = False
|
||||
world.blit(backdrop, backdropbox)
|
||||
pygame.display.flip()
|
||||
clock.tick(fps)
|
||||
# -------------------
|
||||
|
||||
|
BIN
src/stages/Untitled.png
Normal file
BIN
src/stages/Untitled.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1009 B |
BIN
src/stages/Untitled.xcf
Normal file
BIN
src/stages/Untitled.xcf
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user