Commit 81fa2a18 by BellCodeEditor

save project

parent 25b0feff
Showing with 18 additions and 2 deletions
import pygame import pygame
from pygame import locals
# 初始化pygame,为使用pygame做准备 # 初始化pygame,为使用pygame做准备
pygame.init() pygame.init()
# 创建一个窗口 # 创建一个窗口
hu=pygame.display.set_mode((660,480)) a=pygame.display.set_mode((660,480))
while True:
for event in pygame.event.get():
if event.type==locals.QUIT:
exit()
huyi=pygame.image.load('bg.png')
huyi2=pygame.image.load('apple.png')
huyi3=pygame.image.load('body.png')
huyi4=pygame.image.load('right.png')
a.blit(huyi,(0,0))
a.blit(huyi2,(90,0))
a.blit(huyi4,(240,120))
a.blit(huyi3,(210,120))
a.blit(huyi3,(180,120))
a.blit(huyi3,(180,90))
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