用户:
NaXU马虎的超声蝠查看:0 回复:2 评论:0 创建时间:2022-05-03T20:48:21
【作品展示】

【作品介绍】
【作品源代码】
alien1 = Actor("alien", [200, 200])
score1 = 0
time_left = 5
game_over = False
def draw():
screen.fill("lightgreen")
alien1.draw()
screen.draw.text(str(score1), [200, 100])
screen.draw.text(str(time_left), [100, 50])
def on_key_down():
global score1
if game_over == False and keyboard.s == True:
alien1.image = "alien_hurt"
score1 += 1
def on_key_up():
if keyboard.s == False:
alien1.image = "alien"
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn
NaXU马虎的超声蝠imgsrc="https://static.codemao.cn/emoji/codemao/%E7%BC%96%E7%A8%8B%E7%8C%AB_%E5%8A%A0%E6%B2%B9.gif"alt="emotion_编程猫_加油"
点赞1
评论
NaXU马虎的超声蝠imgsrc="https://static.codemao.cn/emoji/codemao/%E7%BC%96%E7%A8%8B%E7%8C%AB_%E5%8A%A0%E6%B2%B9.gif"alt="emotion_编程猫_加油"
点赞1
评论