Commit 687b6f50 by BellCodeEditor

auto save

parent c6188a1e
Showing with 22 additions and 7 deletions
import pygame
import pygame#导入
pygame.init()#初始化
from pygame import locals#导入locals模块
a=pygame.display.set_mode((660,480))#创建窗口
b=pygame.image.load('bg.png')#背景
c=pygame.image.load('right.png')#头
d=pygame.image.load('apple.png')#苹果
e=pygame.image.load('body.png')#身体
aa=pygame.time.Clock(3)
ss=[(150,120),(210,120),(180,120),(180,90)]
while True:
for event in pygame.event.get():
if event.type==locals.QUIT:
erit()#关闭界面
x+=30
screen.blit((b),(0,0))#背景
screen.blit((c),(150,120))#头
screen.blit((e),(210,120))#身体
screen.blit((e),(180,120))#身体
screen.blit((e),(180,90))#身体
screen.blit((d),(630,450))#苹果
pygame.display.update()#刷新.
# 初始化pygame,为使用pygame做准备
pygame.init()
# 创建一个窗口
??
\ 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