Commit 20ea320d by BellCodeEditor

save project

parent 01196dad
Showing with 4 additions and 2 deletions
...@@ -6,13 +6,13 @@ pygame.init() ...@@ -6,13 +6,13 @@ pygame.init()
# 创建一个窗口 # 创建一个窗口
screen = pygame.display.set_mode((660,480)) screen = pygame.display.set_mode((660,480))
FPSCLOCK = pygame.time.Clock()
#背景 #背景
und = pygame.image.load('bg.png') und = pygame.image.load('bg.png')
ght = pygame.image.load('right.png') ght = pygame.image.load('right.png')
ood = pygame.image.load('apple.png') ood = pygame.image.load('apple.png')
ody = pygame.image.load('body.png') ody = pygame.image.load('body.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:
...@@ -23,3 +23,4 @@ while True: ...@@ -23,3 +23,4 @@ while True:
screen.blit(ody,(180,120)) screen.blit(ody,(180,120))
screen.blit(ood,(360,300)) screen.blit(ood,(360,300))
pygame.display.update() pygame.display.update()
FPSCLOCK.tick(3)
\ 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