Commit 5104331f by BellCodeEditor

save project

parent 313f2880
Showing with 13 additions and 5 deletions
......@@ -2,10 +2,18 @@ import pygame
# 初始化pygame,为使用pygame做准备
pygame.init()
# 创建一个窗口
screen = pygame.display.set_mode((800,800))
screen = pygame.display.set_mode((780,600))
bg = pygame.image.load("bg.png")
rt = pygame.image.load("right.png")
food = pygame.image.load("apple.png")
body = pygame.image.load("body.png")
while True:
for event in pygame.event.get():
if event.type ==pygame.QUIT:
exit()
\ No newline at end of file
exit()
screen.blit(bg,(0,0))
screen.blit(rt,(300,150))
screen.blit(body,(270,150))
screen.blit(body,(240,150))
screen.blit(food,(150,150))
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