Commit b00e7cbb by BellCodeEditor

save project

parent 2345a2f8
Showing with 8 additions and 3 deletions
...@@ -6,22 +6,27 @@ pygame.init() ...@@ -6,22 +6,27 @@ pygame.init()
# 创建一个窗口 # 创建一个窗口
screen=pygame.display.set_mode((800,600)) screen=pygame.display.set_mode((800,600))
FPSCLOCK=pygame.time.Clock()
bg=pygame.image.load('bg.png') bg=pygame.image.load('bg.png')
rt=pygame.image.load('right.png') rt=pygame.image.load('right.png')
fd=pygame.image.load('apple.png') fd=pygame.image.load('apple.png')
x,y=240,120
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
if event.type==locals.QUIT: if event.type==locals.QUIT:
exit() exit()
x += 30
screen.blit(bg,(0,0)) screen.blit(bg,(0,0))
screen.blit(rt,(240,120)) screen.blit(rt,(x,y))
screen.blit(fd,(360,300)) screen.blit(fd,(360,300))
pygame.display.update() pygame.display.update()
FPSCLOCK.tick(3)
......
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