- 布局如下:
- 编写移动脚本
cc.Class({
extends: cc.Component,
properties: {
isAdd: {
}//坐标是加还是减
},
// LIFE-CYCLE CALLBACKS:
onLoad() {
//鼠标拖动移动
this.node.on(cc.Node.EventType.TOUCH_MOVE
cc.Class({
extends: cc.Component,
properties: {
isAdd: {
}//坐标是加还是减
},
// LIFE-CYCLE CALLBACKS:
onLoad() {
//鼠标拖动移动
this.node.on(cc.Node.EventType.TOUCH_MOVE