Commit 25074933 by BellCodeEditor

save project

parent 5c0c78f2
Showing with 11 additions and 2 deletions
import pygame import pygame
from pygame import locals from pygame import locals
# 初始化pygame,为使用pygame做准备 # 初始化pygame,为使用pygame做准备
pygame.init() pygame.init()
background=pygame.image.load('bg.png') background=pygame.image.load('bg.png')
apple=pygame.image.load('apple.png') apple=pygame.image.load('apple.png')
right=pygame.image.load('right.png') right=pygame.image.load('right.png')
body=pygame.image.load('body.png') body=pygame.image.load('body.png')
ww=pygame.display.set_mode((660,480)) ww=pygame.display.set_mode((660,480))
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
...@@ -21,6 +27,10 @@ while True: ...@@ -21,6 +27,10 @@ while True:
ww.blit(body,(210,120)) ww.blit(body,(210,120))
ww.blit(body,(180,120)) ww.blit(body,(180,120))
ww.blit(body,(180,90)) ww.blit(body,(180,90))
ww.blit(body,(180,60))
ww.blit(body,(150,60))
ww.blit(apple,(180,270)) ww.blit(apple,(180,270))
pygame.display.update() 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