Commit 233c83df by BellCodeEditor

save project

parent f826aa48
Showing with 2 additions and 3 deletions
import pygame import pygame
from pygame import locals from pygame import locals
x=240
y=120
# 初始化pygame,为使用硬件做准备 # 初始化pygame,为使用硬件做准备
pygame.init() pygame.init()
# 创建一个窗口 # 创建一个窗口
...@@ -12,7 +10,8 @@ background = pygame.image.load('bg.png') ...@@ -12,7 +10,8 @@ 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
posithon=[(180,90),(180,120),(210,120),x+y]
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
if event.type == locals.QUIT: if event.type == locals.QUIT:
......
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