• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 2,657 项符合查询结果, 库内数据总量为 31,629 项。 (搜索耗时: 0.0081 秒)

2641. 列表组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 31%]

...侦听器,而是直接侦听列表的ClickItem事件: list.on(Laya.UIEvent.ClickItem, this, this.onClickItem); // 回调函数的第一个参数就是当前被点击的对象 function onClickItem(item: GObject): void { console.log("点击了对象:" + item.title); //获得这个对象在列表...

来源: Laya3.0_文档 发布时间: 20251128

2642. Laya多点触控是有开关吗 为什么多点触控没有任何反应 [ 31%]

...点上了 谢谢 186*****868 • 2019-06-04 12:03 @IBA: mouseMove(e: Laya.Event) { //触摸移动的整量 let touches = e.touches; if (touches && touches.length == 2) { let distance = this.getDistance(e.touches); //判断当前距离与上次距离变化,确定是放大还是缩小 const ...

来源: Laya_社区 发布时间: 20190531

2643. laya.d3.core.Transform3D [ 30%]

...ds Packagelaya.d3.coreClasspublic class Transform3DInheritanceTransform3D EventDispatcher Object Transform3D 类用于实现3D变换。 Public Properties PropertyDefined By  localMatrix : Matrix4x4 获取局部矩阵。 Transform3D  localPosition : Vector3 获取局部位置。 Transform3D  ...

来源: Laya2.0_api 发布时间: 20190513

2644. 富文本:LayaAir下 HtmlDivElement的使用汇总 [ 30%]

...://ask.layabox.com/'>LayaBox欢迎你的加入!</span>"; div.on(Event.LINK,this,onLink); Laya.stage.addChild(div); } private function onLink(data:*):void { // TODO Auto Generated method stub Browser.window.location.href=data; }5、实现html页面跳转 示例如下: var iHtml:HTMLIfram...

来源: Laya_社区 发布时间: 20161027

2645. rigidBody.applyForce 物体不会移动 [ 30%]

...a.stage.width / 5) * 2; Laya.stage.addChild(this.text); Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.onMouseDown); let building: Laya.Sprite3D = scene.getChildByName( "Buliding" ) as Laya.Sprite3D; let moveArea: Laya.MeshSprite3D = building.getChildByName( "fence15" ) as Laya.MeshSprite3D; consol...

来源: Laya_社区 发布时间: 20200917

2646. 3D寻路 · LayaAir3.0文档 · LAYABOX [ 30%]

...得最短路径的调用: //设置鼠标弹起事件响应 Laya.stage.on(Event.MOUSE_UP, this, function (): void { //起始和目标点 var start = this.graph.grid[this.startPoint.x][this.startPoint.y]; var end = this.graph.grid[this.endPoint.x][this.endPoint.y]; //调用A* serach方法获得最...

来源: Laya3.0_文档 发布时间: 20230303

2647. 父物体旋转会导致子物体的世界坐标系不正确?(附demo) [ 28%]

...Pivot").getChildByName("TargetGuard") as Laya.Sprite3D; Laya.stage.on(Laya.Event.KEY_PRESS, this, this.KeyPress); this.pivot = s.getChildByName("target_root").getChildByName("PendulumCircleTarget").getChildByName("MoveBlockPivot") as Laya.Sprite3D; let newRot = new Laya.Quaternion(0, 0, 0, 0); Laya....

来源: Laya_社区 发布时间: 20171228

2648. 角色控制器 · LayaAir3.3 · 引擎文档 · LAYABOX [ 27%]

...cterController.position = new Laya.Vector3(0, 0, 0); } onKeyDown(evt: Laya.Event): void { switch (evt.keyCode) { case Laya.Keyboard.SPACE: //按键盘空格时 this.characterController.jump(this.jumpVector); // 跳跃 break; } } } 4.4 获得垂直速度 getVerticalVel() 垂直速度方法主要用...

来源: Laya3.0_文档 发布时间: 20251010

2649. 动画状态机 · LayaAir3.3 · 引擎文档 · LAYABOX [ 26%]

...prite3D; private animator : Laya.Animator; onStart() { this.label.on( Laya.Event.CLICK, this, this.test ); //获得状态机 this.animator = this.target.getComponent<Laya.Animator>(Laya.Animator); } //运行状态机的跑动画,可使用动作融合方式 test(e: Laya.Event) { //动画状...

来源: Laya3.0_文档 发布时间: 20251010

2650. 预制体模块 · LayaAir3文档 · LAYABOX [ 25%]

...en("./Scenes/Index.ls"); }); }); // 侦听加载失败 Laya.loader.on(Laya.Event.ERROR, this, this.onError); }); } /** * 当报错时打印错误 * @param err 报错信息 */ onError(err: string): void { console.log("加载失败: " + err); } /** * 加载时侦听 */ onLoading(progress: number): voi...

来源: Laya3.0_文档 发布时间: 20241014