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

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

131. 加载-错误处理和进度 [ 85%]

...fighter.png", "res/legend/map.jpg"]; Laya.loader.load(urls, Handler.create(this, this.onAssetLoaded), Handler.create(this, this.onLoading, null, false), Loader.TEXT); // 侦听加载失败 Laya.loader.on(Event.ERROR, this, this.onError); } onAssetLoaded(texture) { // 使用texture console.log("加...

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

132. 绘制形状时事件不触发 [ 85%]

...时事件不触发 function myRing(x,y,r1,color1,r2,color2) {         this.sprite = new Laya.Sprite();     this.sprite.on('mousedown', this, on_down);     this.sprite.graphics.drawCircle(x, y, r2, color2, color2, 2);     this.sprite.graphics.drawCircle(x, y, r1, color1, color1, 0);     ...

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

133. 在UI类里调用启动类的静态函数失败了 [ 85%]

...l: "res/atlas/comp.atlas", type: Laya.Loader.ATLAS }], Laya.Handler.create(this, this.onLoaded), Laya.Handler.create(this, this.onLoading)); } static aaa(): void { } private onLoaded(): void { var info = new view.GameInfo(); info.zOrder = 99;//置最顶,这句话不写图层看不见 // info.init();...

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

134. CameraMoveScript.as在哪儿下载群里的有错 [ 85%]

...Sprite3D):void { super._initialize(owner); Laya.stage.on(Event.MOUSE_DOWN, this, mouseDown); Laya.stage.on(Event.MOUSE_UP, this, mouseUp); Laya.stage.on(Event.MOUSE_OUT, this, mouseOut); var camera:BaseCamera = owner.scene.currentCamera; 没有了 -- currentCamera 2017-02-18 添加评论 免费帖 -...

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

135. 怎么播放声音? [ 85%]

...var bg_sound:Laya.Sound =new Laya.Sound(); bg_sound.on(Laya.Event.COMPLETE,this,this.loadcom_f); bg_sound.on(Laya.Event.PROGRESS,this,this.loadcom_f); bg_sound.on(Laya.Event.ERROR,this,this.loadcom_f); bg_sound.load("res/bg.mp3"); private loadcom_f(e:Laya.Event):void{ console.log("------------------...

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

136. Spine适配版(JavaScript-LayaAir基础篇(JS)-动画基础) [ 85%]

...画播放模式 在下面的示例代码中有一段代码 ```typescript this.skeleton = this.templet.buildArmature(); ``` 与内置版Spine动画播放模式不同的地方在于内置版我们需要传一个参数来确认使用哪种模式(三种模式中,0:不支持换装,1,2支持换装)...

来源: Laya2.0_文档 发布时间: 20210715

137. 事件函数作用域问题 [ 85%]

事件函数作用域问题 1. this.btn_Login.on(Laya.Event.CLICK, null, ()=>{ if (this.loginDig) { this.loginDig.removeSelf(); this.loginDig.destroy(); } 2.this.btn_ok.on(Laya.Event.RIGHT_CLICK, this, this.OnBut_Open); OnBut_Open() : void { this.removeSelf(); this.destroy(); } 就是这两个...

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

138. 3D模型旋转问题,鼠标移动之后,根据按下移动的X坐标差值判断左右旋转,但是会越转越快,请问是什么问题? [ 84%]

...ate: Laya.RenderState):void{ // console.log(mX + "移动"); // console.log(this.lastMouseX + "按下"); let mX:number = Laya.stage.mouseX; let mY:number = Laya.stage.mouseY; let vec:Laya.Vector3 ; if(this.isDown){ if(this.lastMouseX - mX > 0) { vec = new Laya.Vector3(0,-1,0); } else { vec = new L...

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

139. 左右上下能拖拽地图添加on事件报错 [ 84%]

... 关注: 4 人 linyewen • 2022-02-25 17:45 这么修改也会报错吧,this._events[type]是个数组 linyewen • 2022-02-28 11:05 @linyewen:况且增加的this._events[type]上面不是已经判断过了吗 Laya_Yan • 2022-02-28 11:52 @linyewen:你按照图中还会报错吗?报错的话...

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

140. 播放骨骼动画 [ 84%]

...么优化。 private factory:Laya.Templet; private avatar:Laya.Skeleton; this.factory = new Laya.Templet(); this.factory.on(Laya.Event.COMPLETE, this, this.parseComplete); this.factory.on(Laya.Event.ERROR, this, this.onError); this.factory.loadAni("sp/aa.sk"); this.avatar = this.factory.buildArmatur...

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