Commit 54f69fc4 by BellCodeEditor

save project

parent 961017f1
Showing with 14 additions and 1 deletions
...@@ -2,7 +2,13 @@ import pygame ...@@ -2,7 +2,13 @@ import pygame
from pygame import locals from pygame import locals
# 初始化pygame,为使用pygame做准备 # 初始化pygame,为使用pygame做准备
pygame.init() 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)) s=pygame.display.set_mode((800,600))
while True: while True:
...@@ -11,3 +17,9 @@ while True: ...@@ -11,3 +17,9 @@ while True:
if event.type==locals.QUIT: if event.type==locals.QUIT:
exit() exit()
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