Commit 917e7262 by BellCodeEditor

auto save

parent e66140e1
Showing with 25 additions and 1 deletions
import pygame
#从pygame模块里导入locals子模块
from pygame import locals
# 初始化pygame,为使用pygame做准备
pygame.init()
# 创建一个窗口
screen=pygame.display.set_mode((660,480))
#加载图片(背景、头、身体、水果)
#使用无限循环
while True:
#对pygame里的事件进行遍历
for event in pygame.event.get():
#接收到退出事件后退出
pass
#将背景图画上去
screen.blit(background,(0,0))
#将蛇头画上去(240,120)
#将蛇的身体画上去(3个位置(210,120)(180,120)(180,90)
#将水果画上去
#刷新画面
\ 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