Commit 6df5d85b by BellCodeEditor

save project

parent a298c976
Showing with 28 additions and 7 deletions
import pygame
from pygame import locals
# 初始化pygame,为使用pygame做准备
pygame.init()
bg=pygame.image.load('bg.png')
apple=pygame.image.load('apple.png')
......@@ -11,17 +12,23 @@ down=pygame.image.load('down.png')
up=pygame.image.load('up.png')
# 创建一个窗口
screen=pygame.display.set_mode((660,480))
FPS=pygame.time.Clock()
a=240
while True:
a+=30
for event in pygame.event.get():
print(event)
if event.type == locals.QUIT:
exit()
screen.blit(bg,(0,0))
screen.blit(right,(210,120))
screen.blit(right,(a,120))
screen.blit(body,(a-30,120))
screen.blit(body,(a-60,120))
screen.blit(body,(a-90,90))
screen.blit(apple,(a--30,120))
screen.blit(body,(180,120))
screen.blit(body,(150,120))
screen.blit(body,(150,90))
screen.blit(apple,(360,90))
pygame.display.update()
\ No newline at end of file
pygame.display.update()
FPS.tick(3)
import pygame
import pygame
from pygame import locals
# 初始化pygame,为使用pygame做准备
pygame.init()
# 创建一个窗口
screen=pygame.display.set_mode((660,480))
for i in range(100):
for event in pygame.event.get():
print(event)
if event.type == locals.QUIT:
exit()
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