Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you may not be able to execute some actions.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
Tilemap_1.snapy(主角.x) 和直接输出 "主角.x" 有什么区别?为什么值不一样?
@凄雨Rain 你去看看两个表达式自己各自的意思不就知道了吗,而且snapy是返回所在tilemap格子的中心y坐标,企图拿Tilemap_1.snapy(主角.x)来获取值,肯定是大概率不同啊,另外提醒一下就是 主角.x 不要加双引号才能正常获取到主角的x坐标,加了双引号就变成【主角.x】这几个字符本身了。