|
@@ -101,6 +101,30 @@ export class BaseZhaocha extends Component {
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}, this)
|
|
}, this)
|
|
|
|
+ this.node.on(Node.EventType.MOUSE_UP,(event: EventTouch) => {
|
|
|
|
+ if (this.bool_cantouch == false) return
|
|
|
|
+ this.bool_cantouch = false
|
|
|
|
+ this.scheduleOnce(() => {
|
|
|
|
+ this.bool_cantouch = true
|
|
|
|
+ }, 0.1)
|
|
|
|
+ if (this.bool_needshowX) {
|
|
|
|
+ // AudioManager.instance.playBundleAudio("false")
|
|
|
|
+ // let worldpos = event.getUILocation()
|
|
|
|
+ let scpos = event.getLocation()
|
|
|
|
+ let wopos = this.cam.screenToWorld(new Vec3(scpos.x, scpos.y, 0))
|
|
|
|
+ // let localpos = this.arr_node_allitem[0].parent.getComponent(UITransform).convertToNodeSpaceAR(new Vec3(worldpos.x, worldpos.y))
|
|
|
|
+ let localPos1 = this.cam.convertToUINode(wopos,this.arr_node_allitem[0].parent)
|
|
|
|
+ let localpos = new Vec3(localPos1.x,localPos1.y)
|
|
|
|
+ LayerMgr.instance.ShowPrefab(BundleName.hall, "prefab/x", (node) => {
|
|
|
|
+ node.parent = this.arr_node_allitem[0].parent
|
|
|
|
+ node.setPosition(localpos)
|
|
|
|
+ this.scheduleOnce(() => {
|
|
|
|
+ node?.destroy()
|
|
|
|
+ }, 0.3)
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }, this)
|
|
|
|
+
|
|
|
|
|
|
EventMgr.ins.addEventListener("game_tishi", this.ShowTishi, this)
|
|
EventMgr.ins.addEventListener("game_tishi", this.ShowTishi, this)
|
|
|
|
|
|
@@ -156,6 +180,11 @@ export class BaseZhaocha extends Component {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ onClickOver()
|
|
|
|
+ {
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
getNullItem() {
|
|
getNullItem() {
|
|
// for (let index = 0; index < this.sv_cha.content.children.length; index++) {
|
|
// for (let index = 0; index < this.sv_cha.content.children.length; index++) {
|
|
// if (this.sv_cha.content.children[index].children.length == 0) {
|
|
// if (this.sv_cha.content.children[index].children.length == 0) {
|