Commit f89103dc by BellCodeEditor

save project

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