Commit 70c171a1 by BellCodeEditor

save project

parent cd74e2df
Showing with 22 additions and 3 deletions
import pygame import pygame
from pygame import locals
# 初始化pygame,为使用pygame做准备 # 初始化pygame,为使用pygame做准备
pygame.init() pygame.init()
bg = pygame.image.loadd('bg.png')
right = pygame.image.loadd('right .png')
apple = pygame.image.loadd('apple.png')
body = pygame.image.loadd('body.png')
# 创建一个窗口 # 创建一个窗口
d=pygame.display.set_mode((660,480)) d = pygame.display.set_mode((660,480))
\ No newline at end of file
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
exit()
d.blit(bg,(0,0))
d.blit(right,(240,120))
d.blit(apple,(390,330))
d.blit(body,(210,120))
d.blit(body,(180,120))
d.blit(body,(180,900))
pygame.display.urgent()
\ 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