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

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

131. Animation 使用疑问 [ 50%]

...      });   播放时大概 playAniBody(actionName: string, direction: number, completeFun: Function = null): void {          this.aniBody.destroyChildren();          this.aniBody.clear();         let loopPlay: boolean = true;         let key: string = actionName + "_" + Math.a...

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

132. 通过绘制纹理生成的图片,改变scale时会出现图片不绘制的情况 [ 50%]

...     Laya.stage.addChild(sp);             let _picScale:number=1;             //每点一下就缩小0.05倍             Laya.stage.on(Laya.Event.MOUSE_DOWN,this,()=>{                 _picScale-=0.05;                 sp.sca...

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

133. 简单粒子效果,发布成单机版apk在移动端安装运行,结果显示不出来 [ 49%]

.../LayaUISampl ... annot read property 'start' of null this.sp.emitter.start(Number.MAX_VALUE); TypeError: Cannot read property 'start' of null     at LayaUISample.__proto.onAssetsLoaded (http://www.xxx.com/LayaUISample.max.js:440)     at EventHandler.__proto.run (http://www.xxx.com/LayaUISample.m...

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

134. 在List渲染的时候,在滚动一个list的时候,如何实现另一个list也跟着滚动,并且两个list同时滚动一模一样。 [ 48%]

...list渲染 */ private OnRankLisLabRender(item:component.UIButton, index: number): void { item.name = index.toString(); item.onClick(this,this.OnCliickItem); } /** 点击item单个道具的时候*/ private OnCliickItem(item: component.UIButton) { let index = parseInt( item.name ); }

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

135. 使用方向键 控制精灵在格子中移动 [ 47%]

... Laya.timer.frameLoop(1,this,this.loop);事件响应 onkeyup(e){ for(let i:number = 0;i<this.keyList.length;i++){ if(this.keyList[i]==e.keyCode){ this.keyList.splice(i,1); break; } } } onkeydown(e){ if(this.keyList.indexOf(e.keyCode)<0){ this.keyList.push(e.keyCode); } } loop(){ if(this.sp.x!=...

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

136. 这样的panel请问如何实现比较好? [ 47%]

...layoutSecond.visible = false; } //点击切换状态 private change(state: number, e: Laya.Event) { e.stopPropagation(); this.state = state; this.layoutSecond.visible = (state === 0); this.btnFirst.visible = (state !== 0);  } }   2.定义一个界面,界面上放一个Panel(因为要滑动) clas...

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

137. 要做一个方形倒计时,请问该怎么实现,不知道该怎么做 [ 47%]

...ART:int = -90; public static const COLOR:String = "#000000"; private var r:Number = BarCell.WID / Math.SQRT2; private var rect:Rectangle = new Rectangle(0,0,BarCell.WID,BarCell.WID); private var pos:int = BarCell.WID*0.5; private var endTime:int; private var cdTime:int; public var isCd:Boolean = fal...

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

138. 高级应用-寻路导航 [ 46%]

...ivate _quaternion: Laya.Quaternion = new Laya.Quaternion(); private index: number = 0; private curPathIndex: number = 0; private nextPathIndex: number = 1; private moveSprite3D: Laya.Sprite3D; private pointCount: number = 10; private scene: Laya.Scene; constructor() { Laya3D.init(0, 0, true); Laya.s...

来源: Laya_示例 发布时间: 20251130

139. 菜鸟提问:请问使用LayaAir的话,AS3原生类以及一些第三方库完全不能用是吗? [ 45%]

...以用,基础类型Numer,String,Object可以用,Int估计也是用Number凑合着用,JS有的那就可以用,JS没有的就必须用Laya引擎提供的库的API才行是吗?   希望能得到解答,万分感谢!! 2017-05-10 添加评论 免费帖 --> 分享 微博 QZONE 微信 ...

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

140. 角色模型的材质列表切换后,不播放动作了 [ 44%]

...class CustomMaterial extends Laya.BaseMaterial { static DIFFUSETEXTURE_ID: number = 1; constructor() { super(); this.setShaderName("CustomShader"); } public getDiffuseTexture(): Laya.BaseTexture { return this._getTexture(CustomMaterial.DIFFUSETEXTURE_ID); } public setDiffuseTexture(value: Laya.BaseT...

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