Commit 8b0f7513 by BellCodeEditor

auto save

parent c6188a1e
Showing with 26 additions and 2 deletions
......@@ -3,5 +3,29 @@ import pygame
# 初始化pygame,为使用pygame做准备
pygame.init()
WIDTH = 800
HEIGHT = 600
# 创建一个窗口
??
\ No newline at end of file
screen = pygame.display.set_mode((WIDTH,HEIGHT))
background = pygame.image.load("bg.png")
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:
exit()
screen.blit(background,(0,0))
screen.blit(apple,(540,420))
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