我该如何解决这个问题?
这是我的代码: http://pastie.org/1795351
我希望此代码能够删除 af 或 bf(如果其接触地面) 。但我不能这样做,因为“无法定义 bf 的属性”和 af。
我需要将它放在其他函数之外,因为否则我会有很多代码。
if(bf || af.hitTestObject(Basket)){
removeChild(bf || af);
}
This is my code:
http://pastie.org/1795351
I want this code to be able to remove af or bf if its touching ground. But I can't do that because "cant define property of bf" and af.
And I need to have it outside the other functions because I will have alot of code otherwise.
if(bf || af.hitTestObject(Basket)){
removeChild(bf || af);
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在你的代码中没有看到可以测试的依据,也许你错过了?
I see no ground in your code to test against, maybe you missed it?