Commit 085db6b2 by BellCodeEditor

save project

parent 61bc6607
Showing with 4 additions and 3 deletions
kkkkkkkkkk=pygame.time.Clock()
import pygame import pygame
from pygame import locals from pygame import locals
...@@ -7,13 +7,13 @@ pygame.init() ...@@ -7,13 +7,13 @@ pygame.init()
# 创建一个窗口 # 创建一个窗口
screen = pygame.display.set_mode((660, 480)) screen = pygame.display.set_mode((660, 480))
kkkkkkkkkk=pygame.time.Clock()
# 背景 # 背景
background = pygame.image.load('bg.png') background = pygame.image.load('bg.png')
right = pygame.image.load('right.png') right = pygame.image.load('right.png')
food = pygame.image.load('apple.png') food = pygame.image.load('apple.png')
body = pygame.image.load('body.png') body = pygame.image.load('body.png')
x+=30 x,y=240,120
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
...@@ -21,6 +21,7 @@ while True: ...@@ -21,6 +21,7 @@ while True:
# 接收到退出事件后退出程序 # 接收到退出事件后退出程序
exit() exit()
# 将背景图画上去 # 将背景图画上去
x+=30
screen.blit(background, (0, 0)) screen.blit(background, (0, 0))
# 将贪吃蛇画上去 # 将贪吃蛇画上去
screen.blit(right, (x, y)) screen.blit(right, (x, y))
......
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