大约有 2 项符合查询结果, 库内数据总量为 30,935 项。 (搜索耗时: 0.0022 秒)
...=> { console.log("clicked"); }); class MyScript extends Laya.Script { //脚本事件 onMouseClick(e:Event) { console.log("clicked"); } } aNode.addComponent(MyScript); 以上两种方式是等价的,且在纯2D,或2D/3D混合这两种情况中均可正常使用。 3.2 2D能对3D正确遮挡。...
来源: Laya3.0_文档 发布时间: 20250310
...-5所示: (动图12-5) 3.2.6 标签 label 碰撞体的标签,用于脚本物理碰撞事件中的碰撞体识别,当自定义了标签名后,如图12-6所示。 (图12-6) 应对的示例代码: onTriggerEnter(other: any): void { //other是碰撞到的碰撞体对象,根据碰撞到...
来源: Laya3.0_文档 发布时间: 20250310