Commit 46f14271 by BellCodeEditor

auto save

parent 29d8f5c8
Showing with 12 additions and 2 deletions
...@@ -3,10 +3,19 @@ import pygame ...@@ -3,10 +3,19 @@ import pygame
# 初始化pygame,为使用pygame做准备 # 初始化pygame,为使用pygame做准备
pygame.init() pygame.init()
# 创建一个窗口
o=pygame.display.set_mode((660,480)) o=pygame.display.set_mode((660,480))
o1=pygame.image.load("bg.png")
o2=pygame.image.load("right.png")
o3=pygame.image.load("apple.png")
o4=pygame.image.load("body.png")
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
if event.type==locals.QUIT: if event.type==locals.QUIT:
exit() exit()
o.blit(o1,(0,0))
o.blit(o2,(120,90))
o.blit(o3,(90,150))
o.blit(o4,(90,90))
o.blit(o4,(60,90))
o.blit(o4,(60,120))
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