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

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

421. 2.0怎样播放音效? [ 59%]

...音效"); SoundManager.playSound("../../../../res/sounds/btn.mp3", 1, new Handler(this, onComplete)); 2018-10-21 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 binhuawei 相关问题 IOS系统内嵌H5游戏,退到后台,等几秒返...

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

422. 取色器组件 · LayaAir3.0文档 · LAYABOX [ 59%]

...colorPicker.skin = this.skin; colorPicker.pos(100, 100); colorPicker.changeHandler = new Laya.Handler(this, this.onChangeColor, [colorPicker]); this.owner.addChild(colorPicker); this.onChangeColor(colorPicker); } private onChangeColor(colorPicker: Laya.ColorPicker, e: any = null): void { console.log...

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

423. 使用loadImage加载一个图片后的点击事件 [ 59%]

...rite(); Laya.stage.addChild(ape); ape.loadImage(img,360, 300, 60, 60, Laya.Handler.create(this, function(){         ape.on(Laya.Event.CLICK, this, function(){         console.log(111)     }) }));使用这段代码加载了一个60x60大小的图片(下图中骑马的那个人物),并...

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

424. ViewStack属性详解(JavaScript-IDE篇(JS)-IDE组件属性详解) [ 59%]

...,执行onLoaded回调方法 Laya.loader.load("res/atlas/comp.atlas",Laya.Handler.create(this,onLoaded)); function onLoaded(){ //创建一个UI实例 this.comp = new ui.ComponentDemoUI(); //添加到舞台上显示 Laya.stage.addChild(this.comp); //点击Tab选择按钮的处理 this.comp.tab.selec...

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

425. LayaAir原生DOM交互(TypeScript-2D进阶篇(TS)-扩展模块) [ 59%]

...x.com/"; this.qrcode.makeCode(url); Laya.stage.once("click",this,this.clickHandler); this.qrcodeSp = new Laya.Sprite(); Laya.stage.addChild(this.qrcodeSp); } private clickHandler():void{ var url:string = this.qrcode._oDrawing._elImage.src;//获取,注意这里是异步的,开发者可以加个...

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

426. UI界面加载有哪些回调方法可用 [ 59%]

...用 Laya.loader.load([{ url: "res/atlas/comp.json", type: Loader.ATLAS }], Handler.create(this, this.onLoaded)); 类似于this.onLoaded函数,还有哪些生命周期相关的回调呢。 我想在UI完全加载完毕后,完成一些init操作,this.onLoaded方法中无法获取采用相对布...

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

427. Sprite3D的克隆(ActionScript-3D基础(AS3)-LayaAir3D之精灵) [ 59%]

... Laya.loader.create("res/threeDimen/skinModel/LayaMonkey/LayaMonkey.lh", Handler.create(this, onComplete)); } ////完成回调 public function onComplete():void { //获取资源 var layaMonkey:Sprite3D = scene.addChild(Loader.getRes("res/threeDimen/skinModel/LayaMonkey/LayaMonkey.lh")) as Sprite3D; ...

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

428. laya.ui.Dialog_API3.0 [ 59%]

...一个 Dialog 实例。 package { import laya.ui.Dialog; import laya.utils.Handler; public class Dialog_Example { private var dialog:Dialog_Instance; public function Dialog_Example() { Laya.init(640, 800);//设置游戏画布宽高、渲染模式。 Laya.stage.bgColor = "#efefef";//设置画布的...

来源: Laya3.0_api 发布时间: 20231115

429. texture2D的setPixel纹理rgba数据之后会随着窗口的缩放,渐变成黑色 [ 59%]

...ya.Vector3(90, 0, 0), false, false); Laya.loader.load(this.AllPng,new Laya.Handler(this,this.onCallBack),null,Laya.Loader.BUFFER); Laya.stage.on(Laya.Event.KEY_DOWN,this,this.onKey); //######################################################################## } private curStatus:boolean = false; priva...

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

430. 请问如何释放atlas他的png资源 [ 59%]

...d { url = "res/CH/atlas/MORNUI_Z_Gongneng.atlas"; Laya.loader.load(url,new Handler(this,hh)); //trace( Laya.loader.getRes(url) ); } private function hh():void { Laya.stage.addChild(new Image("MORNUI_Z_Gongneng/clip_xue_quan.png")); Laya.timer.once(1000,1,ddd); } private function ddd():void { trace("...

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