Commit d55f7976 by BellCodeEditor

save project

parent c6188a1e
Showing with 27 additions and 3 deletions
import pygame import pygame
import sys
# 初始化pygame,为使用pygame做准备 # 初始化pygame,为使用pygame做准备
pygame.init() pygame.init()
WIDTH = 640
HEIGHT = 354
# 创建一个窗口 # 创建一个窗口
?? screen = pygame.display.set_mode((WIDTH,HEIGHT))
\ No newline at end of file
background = pygame.image.load("background.jpg")
right = pygame.image.load("right.png")
left = pygame.image.load("left.png")
down = pygame.image.load("down.png")
up = pygame.image.load("up.png")
body = pygame.image.load("body.png")
apple = pygame.image.load("apple.png")
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
sys.exit()
screen.blit(background,(0,0))
screen.blit(apple,(123,234))
screen.blit(right,(210,210))
screen.blit(body,(180,210))
screen.blit(body,(150,210))
screen.blit(body,(150,180))
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