• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python visitorUtil.visitGeneric函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中visitorUtil.visitGeneric函数的典型用法代码示例。如果您正苦于以下问题:Python visitGeneric函数的具体用法?Python visitGeneric怎么用?Python visitGeneric使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了visitGeneric函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: visitOr

def visitOr(blockcontext):
    operand1 = visitGeneric(blockcontext, "OPERAND1")
    if operand1 is None:
        operand1 = False
    operand2 = visitGeneric(blockcontext, "OPERAND2")
    if operand2 is None:
        operand2 = False
    return ["|", operand1, operand2]
开发者ID:Catrobat,项目名称:ScratchToCatrobat,代码行数:8,代码来源:operator.py


示例2: visitRepeat

def visitRepeat(blockcontext):
    block = blockcontext.block
    times = visitGeneric(blockcontext, "TIMES")
    if times == []:
        times = block.inputs["TIMES"][1][1]
    substack = visitSubstack(blockcontext, "SUBSTACK")
    return ["doRepeat", times, substack]
开发者ID:Catrobat,项目名称:ScratchToCatrobat,代码行数:7,代码来源:control.py


示例3: visitSety

def visitSety(blockcontext):
    y = visitGeneric(blockcontext, "Y")
    return ["ypos:", y]
开发者ID:Catrobat,项目名称:ScratchToCatrobat,代码行数:3,代码来源:motion.py


示例4: visitSetx

def visitSetx(blockcontext):
    x = visitGeneric(blockcontext, "X")
    return ["xpos:", x]
开发者ID:Catrobat,项目名称:ScratchToCatrobat,代码行数:3,代码来源:motion.py


示例5: visitChangexby

def visitChangexby(blockcontext):
    x = visitGeneric(blockcontext, "DX")
    return ["changeXposBy:", x]
开发者ID:Catrobat,项目名称:ScratchToCatrobat,代码行数:3,代码来源:motion.py


示例6: visitPointindirection

def visitPointindirection(blockcontext):
    direction = visitGeneric(blockcontext, "DIRECTION")
    return ["heading:", direction]
开发者ID:Catrobat,项目名称:ScratchToCatrobat,代码行数:3,代码来源:motion.py


示例7: visitGlideto

def visitGlideto(blockcontext):
    secs = visitGeneric(blockcontext, "SECS")
    to = visitGeneric(blockcontext, "TO")
    log.warn("[Scratch3] block {} ({}) possibly not available in Scratch2".format(blockcontext.block.opcode, blockcontext.block.name))
    return ["glideTo:", secs, to] #TODO: not in scratch2?
开发者ID:Catrobat,项目名称:ScratchToCatrobat,代码行数:5,代码来源:motion.py


示例8: visitGoto

def visitGoto(blockcontext):
    to = visitGeneric(blockcontext, "TO")
    return ["gotoSpriteOrMouse:", to]
开发者ID:Catrobat,项目名称:ScratchToCatrobat,代码行数:3,代码来源:motion.py


示例9: visitSeteffectto

def visitSeteffectto(blockcontext):
    block = blockcontext.block
    effect = block.fields["EFFECT"][0]
    value = visitGeneric(blockcontext, "VALUE")
    return ["setGraphicEffect:to:", effect, value]
开发者ID:Catrobat,项目名称:ScratchToCatrobat,代码行数:5,代码来源:looks.py


示例10: visitSayforsecs

def visitSayforsecs(blockcontext):
    message = visitGeneric(blockcontext, "MESSAGE")
    duration = visitGeneric(blockcontext, "SECS")
    return ["say:duration:elapsed:from:", message, duration]
开发者ID:Catrobat,项目名称:ScratchToCatrobat,代码行数:4,代码来源:looks.py


示例11: visitChangeeffectby

def visitChangeeffectby(blockcontext):
    block = blockcontext.block
    effect = block.fields["EFFECT"][0]
    change = visitGeneric(blockcontext, "CHANGE")
    return ["changeGraphicEffect:by:", effect, change]
开发者ID:Catrobat,项目名称:ScratchToCatrobat,代码行数:5,代码来源:looks.py


示例12: visitSetsizeto

def visitSetsizeto(blockcontext):
    size = visitGeneric(blockcontext, "SIZE")
    return ["setSizeTo:", size]
开发者ID:Catrobat,项目名称:ScratchToCatrobat,代码行数:3,代码来源:looks.py


示例13: visitChangesizeby

def visitChangesizeby(blockcontext):
    size = visitGeneric(blockcontext, "CHANGE")
    return ["changeSizeBy:", size]
开发者ID:Catrobat,项目名称:ScratchToCatrobat,代码行数:3,代码来源:looks.py


示例14: visitSwitchbackdropto

def visitSwitchbackdropto(blockcontext):
    backdrop = visitGeneric(blockcontext, "BACKDROP")
    return ["startScene", backdrop]
开发者ID:Catrobat,项目名称:ScratchToCatrobat,代码行数:3,代码来源:looks.py


示例15: visitSwitchcostumeto

def visitSwitchcostumeto(blockcontext):
    costume = visitGeneric(blockcontext, "COSTUME")
    return ["lookLike:", costume]
开发者ID:Catrobat,项目名称:ScratchToCatrobat,代码行数:3,代码来源:looks.py


示例16: visitPlayuntildone

def visitPlayuntildone(blockcontext):
    sound = visitGeneric(blockcontext, 'SOUND_MENU')
    return ['doPlaySoundAndWait', sound]
开发者ID:Catrobat,项目名称:ScratchToCatrobat,代码行数:3,代码来源:sound.py


示例17: visitTurnleft

def visitTurnleft(blockcontext):
    degrees = visitGeneric(blockcontext, "DEGREES")
    return ["turnLeft:", degrees]
开发者ID:Catrobat,项目名称:ScratchToCatrobat,代码行数:3,代码来源:motion.py


示例18: visitGoforwardbackwardlayers

def visitGoforwardbackwardlayers(blockcontext):
    block = blockcontext.block
    direction = block.fields["FORWARD_BACKWARD"][0]
    change = visitGeneric(blockcontext, "NUM")
    return ["goBackByLayers:", change]
开发者ID:Catrobat,项目名称:ScratchToCatrobat,代码行数:5,代码来源:looks.py


示例19: visitGotoxy

def visitGotoxy(blockcontext):
    x = visitGeneric(blockcontext, "X")
    y = visitGeneric(blockcontext, "Y")
    return ["gotoX:y:", x, y]
开发者ID:Catrobat,项目名称:ScratchToCatrobat,代码行数:4,代码来源:motion.py


示例20: visitWhengreaterthan

def visitWhengreaterthan(blockcontext):
    block = blockcontext.block
    sensor = block.fields["WHENGREATERTHANMENU"][0].lower()
    value = visitGeneric(blockcontext, "VALUE")
    return ["whenSensorGreaterThan", sensor, value]
开发者ID:Catrobat,项目名称:ScratchToCatrobat,代码行数:5,代码来源:event.py



注:本文中的visitorUtil.visitGeneric函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python app.run函数代码示例发布时间:2022-05-26
下一篇:
Python pathcore.newPathNode函数代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap