Commit edd3f155 by BellCodeEditor

save project

parent adaed736
Showing with 5 additions and 3 deletions
import pygame import pygame
#导入pygame工具包
from pygame import locals from pygame import locals
# 初始化pygame,为使用pygame做准备
pygame.init() pygame.init()
# 初始化pygame,为使用pygame做准备
b=pygame.image.load('bg.png') b=pygame.image.load('bg.png')
c=pygame.image.load('right.png') c=pygame.image.load('right.png')
d=pygame.image.load('body.png') d=pygame.image.load('body.png')
e=pygame.image.load('apple.png') e=pygame.image.load('apple.png')
#载入图片
# 创建一个窗口 a=pygame.display.set_mode((600,500))# 创建一个窗口
a=pygame.display.set_mode((600,500))
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:
......
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