【问题标题】:How to get the x,y coordinates of the turtle?如何获取海龟的 x,y 坐标?
【发布时间】:2014-04-14 06:29:19
【问题描述】:

Pencil Code中,如何获取默认海龟的相对x,y坐标? 为什么下面的代码不起作用(它返回“0,0”)?

fd 100
write getxy()

如何在调用getxy()之前等待海龟完成移动?

【问题讨论】:

    标签: coffeescript turtle-graphics


    【解决方案1】:

    使用done(fn)。它在所有动画之后调用回调 fn。

    【讨论】:

      猜你喜欢
      • 2013-10-09
      • 1970-01-01
      • 2019-08-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-11-13
      • 1970-01-01
      相关资源
      最近更新 更多