Commit 7dd94f58 by BellCodeEditor

save project

parent 71f3c677
Showing with 11 additions and 0 deletions
...@@ -4,4 +4,15 @@ import pygame ...@@ -4,4 +4,15 @@ import pygame
pygame.init() pygame.init()
# 创建一个窗口 # 创建一个窗口
background = pygame.image.load('bg.png')
right = pygame.image.load('right.png')
food =pygame.image.load('apple.png')
screen = pygame.display.set_mode((660,480)) screen = pygame.display.set_mode((660,480))
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
exit()
screen.bilt(background,(0,0))
screen.bilt(right,(240,120))
screen.bilt(food,(360,300))
pygame.display.update()
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