Commit 40b6daea by BellCodeEditor

auto save

parent 2d5d3a6e
Showing with 11 additions and 3 deletions
bg.jpg

36.2 KB

...@@ -5,7 +5,7 @@ pygame.init() ...@@ -5,7 +5,7 @@ pygame.init()
# 创建一个窗口 # 创建一个窗口
screen=pygame.display.set_mode((660,480)) screen=pygame.display.set_mode((660,480))
bg=pygame.image.load("bg.png") bg=pygame.image.load('bg.jpg')
apple=pygame.image.load("apple.png") apple=pygame.image.load("apple.png")
rr=pygame.image.load("right.png") rr=pygame.image.load("right.png")
bb=pygame.image.load("body.png") bb=pygame.image.load("body.png")
...@@ -13,4 +13,13 @@ while True: ...@@ -13,4 +13,13 @@ 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()
pygame.blit(bg,(0,0)) screen.blit(bg,(0,0))
\ No newline at end of file screen.blit(apple,(360,300))
screen.blit(rr,(240,120))
screen.blit(bb,(210,120))
screen.blit(bb,(180,120))
screen.blit(bb,(180,90))
pygame.display.update()
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