编辑器运行能正常出发Touch事件,微信开发者工作中也能触发Touch事件,但是在微信开发者工具中进行真机调式时,Touch事件却无法触发了,有没有大佬知道是什么原因
onTouchEnd(event:EventTouch)
{
let v1 = event.getUILocation()
let children = this.node.children
for (let i = children.length-1; i >= 0; i--)
{
let block_1 =children[i].getComponent(block)
if (block_1.cantouch == false) //方块不可被点击,则返回
{
continue
}
if (this.is_tip)//正在弹出提示框,则返回
{
return
}
if (this.to_mi == 0)//没有选择要去的米字框,则返回
{
return
}
let node_UITransfrom = children[i].getComponent(UITransform)
if (node_UITransfrom.getBoundingBox().contains(new Vec2(v1.x-360,v1.y-640)))