猫史档案馆


【Python作品分享】新的作品ggggggg

用户:浮躁的蓝甲虫Xgol浮躁的蓝甲虫Xgol查看:0 回复:0 评论:0 创建时间:2021-04-11T18:51:24


【作品展示】

center_image

 

【作品介绍】

bvccccccccccccccccccccccccccccccccccccxv

 

【作品源代码】

import Kitten


def when_start():

    while True:
        Kitten.hide()

def when():

    while True:
        if Kitten.is_key_pressed(32):
            Kitten.make_clone_of('飞机大战-子弹3')
            Kitten.move_to('仙人掌')
            Kitten.hide()
            Kitten.wait_for_sec(1)

def when_clone_made():

    Kitten.show()
    if Kitten.is_key_pressed(32):
        while (not Kitten.is_touched('Self', 'edge')):
            Kitten.add_x(10)
        Kitten.hide()
        import Kitten

def when_start1():

    Kitten.enable_physics()
    Kitten.set_boundary('left_right_bottom_bounds')
    Kitten.set_gravity(20, (-90))
    Kitten.set_actor_as('attend_physics_world')

def when1():

    while True:
        if Kitten.is_key_pressed(37):
            Kitten.add_x((-5))
            Kitten.enable_physics()

def when2():

    while True:
        if Kitten.is_key_pressed(39):
            Kitten.add_x(5)
            Kitten.enable_physics()
            Kitten.set_gravity(30, (-90))

def when3():

    while True:
        if Kitten.is_key_pressed(38):
            Kitten.add_y(10)
            Kitten.enable_physics()
            Kitten.set_gravity(30, (-90))

def when4():

    while True:
        if Kitten.is_touched('Self', 'edge_bottom'):
            Kitten.hide_for_sec(1)
            Kitten.set_xy_for_sec((-300), (-100), 1)
            Kitten.show_for_sec(1)

def when5():

    while True:
        if Kitten.is_key_pressed(40):
            Kitten.add_y((-10))
            Kitten.enable_physics()
            Kitten.set_gravity(900, (-90))

 

【提示】

部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:

https://python.codemao.cn


回复

上一页1 页 / 共 0下一页