当海龟接触时如何杀死它们? [英] How to kill turtles when they touch?
本文介绍了当海龟接触时如何杀死它们?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当海龟彼此接触时,我似乎无法使其死亡.只有当它们在同一补丁上时,我才能杀死它们. 有这样的功能吗?
I can't seem to get turtles to die when they touch each other. I can only kill them when they are on the same patch. Is there any function like this?
to killturtles
if contact?
[die]
end
推荐答案
没有,但前提是您的海龟是圆形的或圆形的.
There is not but assuming your turtles are round or roundish
ask other turtles in-radius (size / 2) [die]
是一个很好的近似值.
is a good approximation.
这篇关于当海龟接触时如何杀死它们?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文