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

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

2191. 萌新不知道弹窗代码怎么写,求参考代码 [ 53%]

...码怎么写,求参考代码 //点击弹出公告 public noticeClick(): void { 代码? } 2017-10-31 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 Monica - 知识达人 赞同来自: 组件效果展示地址...

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

2192. LayaAir2.0中自定义shader可以实现模型顶点偏移吗? [ 53%]

...以实现模型顶点偏移吗? Unity顶点着色器代码如下:   void vert (inout appdata_full v)          {             float4 vPos = mul (UNITY_MATRIX_MV, v.vertex);             float zOff = vPos.z/_Dist;             vPos += _QOff...

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

2193. 怎么播放声音? [ 53%]

...s.loadcom_f); bg_sound.load("res/bg.mp3"); private loadcom_f(e:Laya.Event):void{ console.log("------------------=============") }可是这么写了一户,发现loadcom_f根本就没有被调用,还希望各位能指点一二!!! 谢谢!!! 2016-08-05 添加评论 免费帖 --> 分享 ...

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

2194. 关于event中只读属性touches,问题,求解 [ 53%]

...his, onFunc); Laya.stage.addChild(txt); } private function onFunc(e:Event):void { var arr:Array = e.touches; console.log("e.touchId="+e.touchId); console.log("arr[0]"+arr[0]); } } }  输出为:       不明白touches属性数组里面存储的什么类型的数据,第二个不明白touches...

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

2195. mc.rotation=0的问题 [ 53%]

...n=30; Laya.timer.frameLoop(1,this,onLoop); private function onLoop():void {      mc.rotation-=5;      if(mc.rotation<=0)      {          Laya.timer.clear(this,onLoop);          mc.rotation=0;       }   }   所以,mc.rotation=0时是有误差的 2017-12-28 添加评...

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

2196. 按照打地鼠教程来无法正常加载资源 [ 53%]

....onLoaded));         }         private function onLoaded():void{             //显示界面             var gameView:GameView = new GameView();             Laya.stage.addChild(gameView);         }     }   附件 : --> 2018-01-06 添加...

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

2197. [LayaAirIDE3]请教一下3.3中新的tween怎么动画结束后传参给回调的方法 [ 53%]

...hen(this.onComplete, this);   private onComplete(tweener: Laya.ITweener): void { console.log(tweener.userData); } 2025-09-19 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 荣rong 相关问题 两个对象new了一个相同的对象,...

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

2198. list控件内字体大小设置无效 [ 53%]

...体大小设置无效  private function updateItem(cell:Box, index:int):void{ var itemImg:Image=cell.getChildByName("itemImg") as Image; var itemName:Label=cell.getChildByName("itemName") as Label; itemImg.skin=cell.dataSource.image_url; itemName.width=Number(itemName.text.length*20); itemName.heig...

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

2199. 关于利用代码设置遮罩,遮罩背景色显示的问题 [ 53%]

...色不应该是透明的吗?用IDE创建的遮罩显示正常 onAwake(): void { let mask: Laya.Sprite = new Laya.Sprite(); Laya.stage.addChild(mask); mask.graphics.drawCircle(80,50,40,"#ffffff"); let sprite: Laya.Sprite = new Laya.Sprite(); Laya.stage.addChild(sprite); sprite.loadImage("myComp/loa...

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

2200. 怎么给button绑定一个事件,比如console.log一段话 [ 53%]

... btn:Button;btn.on(Event.CLICK, this, onClick); private function onClick():void { console.log(); } 基本就是这个套路加响应事件=。= 官方demo含糊不清的看得累 2018-07-18 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 ...

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