|
@@ -90,11 +90,12 @@ export class BaseZhaocha extends Component {
|
|
|
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) => {
|
|
|
+ // 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) => {
|
|
|
+
|
|
|
node.parent = this.arr_node_allitem[0].parent
|
|
|
- node.setPosition(localpos)
|
|
|
+ node.setWorldPosition(wopos)
|
|
|
this.scheduleOnce(() => {
|
|
|
node?.destroy()
|
|
|
}, 0.3)
|