Commit 12665251 by BellCodeEditor

save project

parent 680f4872
Showing with 22 additions and 3 deletions
import pygame import pygame
from pygame import locals
# 初始化pygame,为使用pygame做准备 # 初始化pygame,为使用pygame做准备
pygame.init() 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")
e=pygame.time.Clock()
e.tick(3)
# 创建一个窗口 # 创建一个窗口
pygame.display.set_mode((660,480)) screen=pygame.display.set_mode((660,480))
\ No newline at end of file while True:
for event in pygame.event.get():
if event.type ==locals.QUIT:
exit()
screen.blit(a,(0,0))
screen.blit(b,(240,300))
screen.blit(c,(300,360))
screen.blit(d,(210,300))
screen.blit(d,(180,300))
screen.blit(d,(180,270))
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