Commit ab59c11f by BellCodeEditor

save project

parent c6188a1e
Showing with 21 additions and 2 deletions
import pygame import pygame
from pygame import locals
# 初始化pygame,为使用pygame做准备 # 初始化pygame,为使用pygame做准备
pygame.init() pygame.init()
background1 = pygame.image.load("bg.png")
background2= pygame.image.load("apple.png")
background3 = pygame.image.load("body.png")
background4 = pygame.image.load("down.png")
background5 = pygame.image.load("left.png")
background6 = pygame.image.load("right.png")
background7 = pygame.image.load("up.png")
# 创建一个窗口 # 创建一个窗口
?? chuangkou = pygame.display.set_mode((800,600))
\ No newline at end of file while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
exit()
chuangkou.blit(background1,(0,0))
chuangkou.blit(background6,(240,120))
chuangkou.blit(background3,(210,120))
chuangkou.blit(background3,(180,120))
chuangkou.blit(background3,(150,120))
chuangkou.blit(background2,(300,330))
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