Commit 1eb7811a by BellCodeEditor

save project

parent 195a6bcd
Showing with 13 additions and 5 deletions
...@@ -5,10 +5,18 @@ pygame.init() ...@@ -5,10 +5,18 @@ pygame.init()
# 创建一个窗口 # 创建一个窗口
screen=pygame.display.set_mode((800,600)) screen=pygame.display.set_mode((800,600))
a=True running = True
while a: while running:
# poll for events
# pygame.QUIT event means the user clicked X to close your window
for event in pygame.event.get(): for event in pygame.event.get():
if event.type == pygame.QUIT: if event.type == pygame.QUIT:
a = False running = False
bg=pygame.image.load("bg.png")
\ No newline at end of file sk=pygame.image.load("right.png")
ap=pygame.image.load("apple.png")
screen.blit(bg,(0,0))
screen.blit(sk,(240,180))
screen.blit(ap,(540,420))
pygame.display.update()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment