@111859 写道:
新手求助:点击一个按钮,设置精灵的坐标为(10,10),请教这个该怎么实现?
onBtnClick: function () {
var that = this;
console.log('--------->button clickd!!');
that.setHeroPos();
},setHeroPos:function(){ var that = this; console.log('--------->setHeroPos!!'); console.log(that.hero); that.hero.node.x = 10; that.hero.node.y = 10; },
这样写文化什么不行呢?
帖子: 3
参与者: 1