@a6965921 写道:
if ('mouse' in cc.sys.capabilities)
cc.eventManager.addListener({
event: cc.EventListener.MOUSE,
onMouseMove: function (event) {if (event.getButton() == cc.EventMouse.BUTTON_LEFT) console.log(event.getLocation()); var ssss = new cc.Sprite(res.HelloWorld_png); ssss.attr({ x: event.getLocation().x, y: event.getLocation().y }); that.addChild(ssss, 0); } }, this);
这个鼠标我没按左键 也照样能画精灵。。
帖子: 1
参与者: 1