-
Creator 版本:2.4.0
-
目标平台:
-
this.label.string = this.text; let random = Math.random(); let pos =cc.v2(random * 1000, random * 10000); cc.log("-----111-----", pos.x, pos.y) this.label.node.setPosition(pos); cc.log("-----2222-----", this.label.node.x, this.label.node.y)
输出:
Simulator: D/jswrapper (149): JS: -----111----- 322.93745617564019 3229.3745617564018
Simulator: D/jswrapper (149): JS: -----2222----- 322.93746948242188 3229.37451171875
设置前打印的跟设置后取出来打印的值不一致。
@panda