Commit 44cf8aca by BellCodeEditor

save project

parent 7dd011c4
Showing with 12 additions and 11 deletions
import pygame import pygame
from pygame import locals from pygame import locals
backgrond=pygame.image.load('bg.pnd') backgrond=pygame.image.load('bg.png')
right=pygame.image.load('right.pnd') right=pygame.image.load('right.png')
food=pygame.image.load('apple.pnd') food=pygame.image.load('apple.png')
body=pygame.image.load('body.pnd') body=pygame.image.load('body.png')
# 初始化pygame,为使用pygame做准备 # 初始化pygame,为使用pygame做准备
pygame.init() pygame.init()
...@@ -13,13 +13,14 @@ while True: ...@@ -13,13 +13,14 @@ 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()
screen.suface.blit(backgrond,(0,0)) screen.blit(backgrond,(0,0))
screen.suface.blit(right,(240,120,)) screen.blit(right,(240,120,))
screen.suface.blit(food,(360,300)) screen.blit(food,(360,300))
screen.suface.blit(body,(210,120)) screen.blit(body,(210,120))
screen.suface.blit(body,(180,120)) screen.blit(body,(180,120))
screen.suface.blit(body,(180,120)) screen.blit(body,(180,120))
screen.suface.blit(body,(180,90)) screen.blit(body,(180,90))
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