Commit e8efc298 by BellCodeEditor

save project

parent 12e8a3b2
Showing with 31 additions and 22 deletions
# 利用write()帮助悟空给诺依回信吧~ import pygame
import turtle from pygame import locals
screen=turtle.Screen() pygame.init()
screen.bgcolor("light blue") screen = pygame.display.set_mode((1000,600))
len=screen.textinput("100","100") FPS = pygame.time.Clock()
len=int(len) pygame.dispplay.set_caption("悟空跑酷")
pen=turtle.Pen() backpround = pygame.image.load('bg.png')
pen.write("你好\nSB.",font=("Times",30,"normal")) road = pygame.image.load('road.png')
pen.hideturtle() stond = pygame.image.load('stomd.png')
len=60 cacti = pygame.image.load('cacty.png')
pen.penup() apple = pygame.image.load('apple.png')
pen.goto(100,100) hero = [pygame.image.load('hero1.png')
pen.pendown() pygame.image.load('hero2.png')
pen.pensize(5) pygame.image.load('hero3.png')
pen.pencolor("red") pygame.image.load('hero4.png')
pen.left(45) pygame.image.load('hero5.png')]
pen.forward(2*len) index = 0
pen.circle(len,180) while True:
pen.right(90) for event in pygame.event.get():
pen.circle(len,180) if event.type == locals.QUIT:
pen.forward(2*len) exit()
turtle.done() wukon = hero[index]
index += 1
if index == 5:
index = 0
screen.blit(background,(0,0))
screen.blit(road,(0,500))
screen.blit(wukong,(150,400))
pygame.display.update()
FPS.tick(60)
\ 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