Commit 7aac036a by BellCodeEditor

save project

parent 2036bbea
Showing with 16 additions and 3 deletions
...@@ -3,10 +3,24 @@ from pygame import locals ...@@ -3,10 +3,24 @@ from pygame import locals
# 初始化pygame,为使用pygame做准备 # 初始化pygame,为使用pygame做准备
pygame.init() pygame.init()
bg = pygame.image.load("bg.png")
right = pygame.image.load("right.png")
food = pygame.image.load("apple.png")
st = pygame.image.load("body.png")
st = pygame.image.load("body.png")
st = pygame.image.load("body.png")
# 创建一个窗口 # 创建一个窗口
pygame.display.set_mode((660,480)) screen=pygame.display.set_mode((660,480))
while True: while True:
for i in pygame.event. get(): for i in pygame.event. get():
if i.type == locals.QUIT: if i.type == locals.QUIT:
exit() exit()
screen.blit(bg,(0,0))
\ No newline at end of file screen.blit(right,(210,120))
screen.blit(food,(240,120))
screen.blit(st,(180,120))
screen.blit(st,(150,120))
screen.blit(st,(150,150))
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