Commit e90bad12 by BellCodeEditor

save project

parent ff366b45
Showing with 18 additions and 6 deletions
import pygame import pygame
from pygame import locals
# 初始化pygame,为使用pygame做准备
pygame.init() pygame.init()
body=pygame.image.load("body.png")
# 创建一个窗口 bg=pygame.image.load("bg.png")
d=pygame.display.set_mode((660,480)) fas=pygame.image.load("right.png")
\ No newline at end of file apple=pygame.image.load("apple.png")
while True:
d=pygame.display.set_mode((660,480))
for event in pygame.event.get():
if event.type == locals.QUIT:
exit()
d.blit(bg,(0,0))
d.blit(fas,(240,120))
d.blit(apple,(180,0))
d.blit(body,(180,120))
d.blit(body,(180,90))
d.blit(body,(210,120))
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