You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
465 B
13 lines
465 B
const { ccclass, property } = cc._decorator;
|
|
|
|
/**
|
|
* 该组件将所属节点内的所有输入事件穿透到下层节点,一般用于上层 UI 的背景。
|
|
* 该组件没有任何 API 接口,直接添加到场景即可生效。
|
|
*/
|
|
@ccclass
|
|
export class ThroughInputEvents extends cc.Component {
|
|
onLoad(): void {
|
|
// (this.node as any)._touchListener.setSwallowTouches(false);
|
|
// this.node._touchListener.setSwallowTouches(false);
|
|
}
|
|
} |