经过不断的思考发现,如果是两个sprite都添加触控的时候,往往直接成单点触控, 但是如果是两个node的时候在node上面点击就会变成多点触控的形式 cc.Class({ extends: cc.Component, properties: { isAPress:false, aLabel: { default:null, type :cc.Label } }, // use this for initialization onLoad: function () { this.isAPress…
cc.Class({ extends: cc.Component, properties: { progressBar: { default:null, type:cc.ProgressBar }, }, // use this for initialization onLoad: function () { this.progressBar.progress=0.01 }, // called every frame, uncomment this function to activate u…
cc.Class({ extends: cc.Component, properties: { moveSpeed: 100, rotationSpeed: 90 }, // use this for initialization onLoad: function () { }, // called every frame, uncomment this function to activate update callback update: function (dt) { this.node.…
cc.Class({ extends: cc.Component, properties: { elementLable: { default: null, type : cc.Label }, map: { default:null, type :cc.TiledMap }, }, // use this for initialization onLoad: function () { var self=this cc.eventManager.addListener({ event: cc.…