Commit ef00ae50 by BellCodeEditor

save project

parent 36144166
Showing with 23 additions and 8 deletions
# import pygame
# # 初始化pygame,为使用pygame做准备
# pygame.init()
# # 创建一个窗口
import pygame
from pygame import locals
pygame.init()
a=pygame.display.set_mode((660,480))
\ No newline at end of file
bg=pygame.image.load('bg.png')
rt=pygame.image.load('right.png')
ae=pygame.image.load('apple.png')
by=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(bg,(0,0))
screen.blit(rt,(210,210))
screen.blit(ae,(360,180))
screen.blit(by,(180,210))
screen.blit(by,(150,210))
screen.blit(by,(120,210))
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