Commit 54f69fc4 by BellCodeEditor

save project

parent 961017f1
Showing with 15 additions and 3 deletions
......@@ -2,7 +2,13 @@ import pygame
from pygame import locals
# 初始化pygame,为使用pygame做准备
pygame.init()
a=pygame.image.load('apple.png')
b1=pygame.image.load('bg.png')
b=pygame.image.load('body.png')
d=pygame.image.load('down.png')
l=pygame.image.load('left.png')
r=pygame.image.load('right.png')
u=pygame.image.load('up.png')
# 创建一个窗口
s=pygame.display.set_mode((800,600))
while True:
......@@ -10,4 +16,10 @@ while True:
if event.type==locals.QUIT:
exit()
\ No newline at end of file
s.blit(b1,(0,0))
s.blit(r,(150,210))
s.blit(b,(120,210))
s.blit(b,(90,210))
s.blit(b,(90,180))
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