Commit 95069102 by BellCodeEditor

save project

parent b42a9cba
Showing with 14 additions and 4 deletions
import pygame
from pygame import locals
pygame.init() # 初始化
# 创建窗口
screen = pygame.display.set_mode((640, 480))
pygame.init()
screen = pygame.display.set_mord((640,480))
# 载入图片、资源
bg_img = pygame.image.load('background.png') # 背景图
play_img = pygame.image.load('play.png') # 播放按钮
......@@ -59,4 +59,14 @@ while True:
screen.blit(last_img, (120, 350)) # 上一曲
screen.blit(next_img, (420, 350)) # 下一曲
# 刷新画面
pygame.display.update()
pygame.displa
if setheading == "right":
x += 30
elif setheading == "left":
x -=30
elif setheading == "up":
x -=30
else
y +=30
position.append((x,y))
if x == apple_x and y == apple_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