Commit f4f03f2b by BellCodeEditor

save project

parent a3d9c85a
Showing with 12 additions and 4 deletions
import pygame
import pygame import locale
from pygame import locals
# 初始化pygame,为使用pygame做准备
pygame.init()
# 创建一个窗口
背景=pygame.image.load("bg.png")
=pygame.image.load("right.png")
食物=pygame.image.load("food")
身体=
食物=pygame.image.load("apple.png")
身体=pygame.image.load("body.png")
sb=pygame.display.set_mode((250,250))
while True:
for event in pygame.event.get():
if event.type==locale.QUIT:
if event.type==locals.QUIT:
exit()
screen.blit(背景,(0,0))
screen.blit(,(180,120))
screen.blit(食物,(240,360))
screen.blit(身体,(150,120))
screen.blit(身体,(120,120))
screen.blit(身体,(90,120))
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