Commit e8efc298 by BellCodeEditor

save project

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