Commit 4093db27 by BellCodeEditor

save project

parent 2a472371
Showing with 6 additions and 12 deletions
...@@ -2,19 +2,12 @@ import pygame ...@@ -2,19 +2,12 @@ import pygame
from pygame import locals from pygame import locals
# 初始化pygame,为使用pygame做准备 # 初始化pygame,为使用pygame做准备
pygame.init() pygame.init()
a = pygame.image.load('bg.png')
s = pygame.image.load('right.png')
d = pygame.image.load('apple.png')
# 创建一个窗口 # 创建一个窗口
screen = pygame.display.set_mode(size = ((660,480)) pygame.display.set_mode(size = (660,480))
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
print(event)
if event.type == locals.QUIT: if event.type == locals.QUIT:
#接收到退出事件后退出程序 #接收到退出事件后退出程序
exit() exit()
screen.blit(a,(0,0)) \ No newline at end of file
screen.blit(s,(270,120))
screen.blit(d,(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