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

大约有 1,171 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0052 秒)

491. 分享:如何为spine(龙骨)动画添加CLICK事件! [ 70%]

...unction startFun() { mFactory = new Templet(); mFactory.on(Event.COMPLETE, this, parseComplete); mFactory.loadAni("res/spine/spineRes2/goblins.sk"); } function parseComplete() { mArmature = mFactory.buildArmature(1); mArmature.x = 100; mArmature.y = 200; var rect=new Laya.Rectangle(-200,-200,300,300...

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

492. 调用拍照用input file可以么 [ 70%]

...调用图集下的小图 as的看不懂 调用动画结束on方法,报错this.zombieAnimator.on is not a function 脚本组件继承于 Laya.Script。 其中的_update方法,多长时间会调用一次? 可以设置调用时间吗? 如何在PC端浏览器的调试面板调用滚动条? 请...

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

493. 我竟然被射线检测这个小功能给难了一天了 [ 70%]

...esult=new Laya.HitResult() physics:Laya.PhysicsSimulation; onAwake():void{ this.camera = this.owner.getChildByName("Main Camera") as Laya.Camera; let scene: Laya.Scene3D = this.owner.scene as Laya.Scene3D;   this.physics=scene.physicsSimulation;     console.log("相机位置",(this.owner.getChild...

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

494. animation动画对象 无法增加鼠标事件 [ 70%]

...sprit对象 就能正常 。 部分代码如下,动画能正常播放。 this.role = new Laya.Animation(); this.role.on(Laya.Event.MOUSE_DOWN, this, this.onDrag); 2018-07-18 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 ...

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

495. 内置骨骼动画 · LayaAir3.3 · 引擎文档 · LAYABOX [ 70%]

...en((templet: Laya.Templet) => { //创建模式为1,可以启用换装 this.mArmature = templet.buildArmature(0); this.mArmature.x = 300; this.mArmature.y = 350; this.mArmature.scale(0.5, 0.5); this.owner.addChild(this.mArmature); //设置动画播放完成后,调用completeHandler继续播放...

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

496. 手机调试时http请求错误,返回Request failed Status:0 [ 70%]

...new Laya.HttpRequest(); hr.http.timeout = 5000; hr.on(Laya.Event.PROGRESS, this, this.onHttpRequestProgress); hr.once(Laya.Event.COMPLETE, this, (response)=>{ UIFactory.closeWaitBar(); this.onHttpRequestComplete(response); if(handleOk){ handleOk(response); } }); hr.once(Laya.Event.ERROR, this, (e...

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

497. 区块地图-PerspectiveWall [ 70%]

...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createMap(); Laya.stage.on(Laya.Event.CLICK, this, this.onStageClick); } createMap() { const TiledMap = Laya.TiledMap, Rectangle = Laya.Rectangle; this.tiledMap = new TiledMap(); this.tiledMap.createMap("res/tiledMap/per...

来源: Laya2.0_示例 发布时间: 20251209

498. 初学者的提问,如何在场景中获取到对象 [ 70%]

...要如何写,如下: btnclick.js 如下: onAwake(){         this.btn = this.owner;         this.btn.on(Laya.Event.CLICK,this,this.cli)                    }         cli(){         /// how to 获得text 对象,并改变text的值???  ...

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

499. 怎样获取父类? [ 70%]

...添加一个页面TipsView为子类 ... ... var tipView = new TipsView(); this.addChild(tipView);   function enterNextScene() { } ... ...      //这个是TipsView.js类,我想在这个类里调用上面那个父类里enterNextScene的方法,如何获取到上面那个父类呢? var TipsVie...

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

500. [LayaAirIDE3]如何TextArea屏蔽掉右键的快捷菜单 [ 70%]

...   onAwake(): void {         //禁用/启用鼠标右键         this.disableRightClick();         //this.enableRightClick();         //禁用Ctrl+c,Ctrl+v         this.owner.on("keydown", this, (event: KeyboardEvent) => {             if (event.ctrlKey && event....

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