Commit f7ea64b9 by BellCodeEditor

save project

parent 78f946be
Showing with 31 additions and 4 deletions
import pygame import pygame
from pygame impore locale from pygame import locals
# 初始化pygame,为使用pygame做准备 # 初始化pygame,为使用pygame做准备
pygame.init() pygame.init()
# 创建一个窗口 # 创建一个窗口
b1=pygame.display.set_mode((660,480)) b1=pygame.display.set_mode((660,480))
background=pygame.image.load('bg.png')
right=pygame.image.load('right.png')
apple=pygame.image.load('apple.png')
body=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()
\ No newline at end of file b1.blit(background,(0,0))
b1.blit(right,(240,120))
b1.blit(body,(210,120))
b1.blit(body,(180,120))
b1.blit(body,(180,90))
b1.blit(apple,(360,300))
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