Commit 6fd8f386 by BellCodeEditor

auto save

parent f3611b9b
Showing with 19 additions and 8 deletions
import pygame import pygame #导入模块
from pygame import locals from pygame import locals #导入事件模块
# 初始化pygame,为使用pygame做准备 # 初始化pygame,为使用pygame做准备
pygame.init() pygame.init()
# 创建一个窗口 # 创建一个窗口
ck=pygame.display.set_mode((600,600)) a1=pygame.image.load('apple.png') #苹果
while True: a2=pygame.image.load('right.png') #头部
for i in pygame.event.get(): a3=pygame.image.load('body.png') #身体
if i.type==locals.QUIT: a4=pygame.image.load('bg.png') #画布
exit() ck=pygame.display.set_mode((600,600)) #创建窗口
\ No newline at end of file while True: #无限循环(保存窗口)
for i in pygame.event.get(): #遍历
if i.type==locals.QUIT: #条件判断
exit() #条件符合结束程序
ck.blit(a4,(0,0)) #渲染素材
ck.blit(a1,(450,450))
ck.blit(a3,(210,120))
ck.blit(a3,(180,120))
ck.blit(a3,(180,90))
ck.blit(a2,(240,120))
pygame.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