【问题标题】:Action script 3 hittest if statement and coordinate动作脚本 3 hittest if 语句和坐标
【发布时间】:2012-03-26 20:28:55
【问题描述】:

我想知道如何在我的 hittest if 语句中写这个:只要 hittest_mc y 小于 y 坐标 213,则翻译 hittest_mc +70。

到目前为止,我有这个:

if (walk_mc.hitTestObject(goback_mc)) {
        hittest_mc.y<y==213 + 70;
}

我该如何解决这个问题?

【问题讨论】:

    标签: actionscript-3 flash if-statement hittest coordinate


    【解决方案1】:
    if (hittest_mc.y < 213)
    {
        hittest_mc.y = hittest_mc.y + 70;
    }
    

    不确定你指的是什么坐标……你的意思是像舞台上的你?

    【讨论】:

    • 是的,舞台上的 y 坐标。如果这是唯一的方法,是否可以在 if 语句中放置 if 语句?编辑:天哪,它是!谢谢! :D
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-01-15
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多