Commit 714e085a by BellCodeEditor

save project

parent e287ecec
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 import pygame
#from pygame import loc from pygame import locals
# 初始化pygame,为使用pygame做准备 # 初始化pygame,为使用pygame做准备
pygame.init() pygame.init()
# 创建一个窗口 # 创建一个窗口
size=pygame.display.set_mode((600,480)) while True:
\ No newline at end of file size=pygame.display.set_mode((600,480))
for event in pygame.event.get():
if event.type==locals.QUIT:
exit()
a=pygame.image.load("bg.png")
s=pygame.image.load("apple.png")
d=pygame.image.load("right.png")
f=pygame.image.load("body.png")
g=pygame.image.load("body.png")
h=pygame.image.load("body.png")
size.blit(a,(0,0))
size.blit(d,(240,120))
size.blit(s,(330,210))
size.blit(f,(210,120))
size.blit(g,(180,120))
size.blit(h,(180,90))
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