Commit f9949191 by BellCodeEditor

save project

parent cacd2eee
Showing with 14 additions and 3 deletions
...@@ -4,9 +4,20 @@ import pygame ...@@ -4,9 +4,20 @@ import pygame
pygame.init() pygame.init()
# 创建一个窗口 # 创建一个窗口
screem = pygame.display.set_mode((660,480)) screen = pygame.display.set_mode((660,480))
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: while True:
for event in pygame.event.get(): for event in pygame.event.get():
if event.type == pygame.QUIT: if event.type == pygame.QUIT:
exit() exit()
\ No newline at end of file
screen.blit(bg,(0,0))
screen.blit(rt,(300,150))
screen.blit(food,(30,60))
screen.blit(body,(270,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