Commit d299a25a by BellCodeEditor

save project

parent 2903b475
Showing with 3 additions and 21 deletions
import pygame
from pygame import locals
# 初始化pygame,为使用pygame做准备
pygame.init()
a=pygame.image.load('bg.png')
b=pygame.image.load('right.png')
c=pygame.image.load('apple.png')
d=pygame.image.load('body.png')
# 创建一个窗口
screen=pygame.display.set_mode((660,480))
while True:
for event in pygame.event.get():
print(event)
if event.type==locals.QUIT:
exit()
screen.blit(a,(0,0))
screen.blit(b,(240,120))
screen.blit(c,(150,30))
screen.blit(d,(210,120))
screen.blit(d,(180,120))
screen.blit(d,(180,90))
pygame.display.update()
screen=pygame.display.set_mode((660,480))
\ 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