Commit 795f3519 by BellCodeEditor

save project

parent d45538da
Showing with 11 additions and 7 deletions
import pygame import pygame
from pygame import locals
初始化pygame,为使用pygame做准备 #初始化pygame,为使用pygame做
pygame.init() pygame.init()
# 创建一个窗口 # 创建一个窗口
screen=pygame.display.set_mode((660,880)) screen=pygame.display.set_mode((660,880))
bizhi=pygame.image.load("bg.png")
siv=pygame.image.load("right.png")
food=pygame.image.load("apple.png")
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(bizhi,(0,0))
\ No newline at end of file screen.blit(food,(30,60))
screen.blit(siv,(90,180))
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