Commit 9b1571c5 by BellCodeEditor

auto save

parent 1821376f
apple.png

2.05 KB

bg.png

22.5 KB

body.png

1.4 KB

down.png

2.01 KB

left.png

2.07 KB

File added
right.png

2.05 KB

import pygame
#导入pygame工具包
from pygame import locals
pygame.init()
# 初始化pygame,为使用pygame做准备
b=pygame.image.load('bg.png')
c=pygame.image.load('right.png')
d=pygame.image.load('body.png')
e=pygame.image.load('apple.png')
#载入图片
a=pygame.display.set_mode((600,500))# 创建一个窗口
while True:
for event in pygame.event.get():
if event.type==locals.QUIT:
exit()
a.blit(b,(0,0))
a.blit(c,(300,240))
a.blit(d,(270,240))
a.blit(d,(270,210))
a.blit(d,(240,210))
a.blit(e,(150,120))
pygame.display.update()
\ No newline at end of file
up.png

2.05 KB

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