Commit fd8523e2 by BellCodeEditor

save project

parent 540da071
Showing with 29 additions and 0 deletions
#导入
import pygame
from pygame import locals
#初始化
pygame.init()
#创建一个窗口
screen=pygame.display.set_mode((660,480))
background=pygame.image.load('bg.png')
right=pygame.image.load('right.png')
body=pygame.image.load('body.png')
apple=pygame.image.load('apple.png')
while True:
for event in pygame.event.get(): #遍历事件
if event.type == locals.QUIT: #接收到退出事件
exit()
screen.blit(background,(0,0))
screen.blit(right,(240,90))
screen.blit(body,(210,90))
screen.blit(body,(180,90))
screen.blit(body,(150,90))
screen.blit(apple,(360,360))
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