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

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

421. 分享:为List组件下Item(Box)下的Button(或其他组件)进行监听! [ 62%]

...法,AS/TS思路一样,请根据自己的需求进行修改即可!var Loader = laya.net.Loader; var Handler = laya.utils.Handler; var Event = laya.events.Event; // 创建TestPageUI的子类 function TestUI() { TestUI.super(this); //list赋值,先获得一个数据源数组 var arr = ; for (va...

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

422. fillTexture使用问题 [ 62%]

... number = 1188; static height: number = 594; constructor() { super(); Laya.loader.load("res/images/map_01.png", Laya.Handler.create(this, this.bgLoaded)); } bgLoaded(): void { let t: Laya.Texture = Laya.loader.getRes("res/images/map_01.png"); this.width = 1000; this.height = 500; this.graphics.fillT...

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

423. 技术文档中的示例js运行报错 [ 62%]

...错 Uncaught TypeError: this.setTo is not a function(function () { const Loader = Laya.Loader const Handler = Laya.Handler (function () { Laya.init(1136,640) Laya.stage.bgColor="#fff" Laya.loader.load('./../bin/res/atlas/res.atlas', Handler.create(this, onLoaded)) })() function onLoaded() { var cMa...

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

424. 抖音小游戏 · LayaAir3.0文档 · LAYABOX [ 62%]

...此方法只执行一次 */ onAwake(): void { //小游戏加载分包 Laya.loader.loadPackage("sub1", this.printProgress).then(() => { Laya.loader.load("sub1/Cube.lh").then((res: Laya.PrefabImpl) => { let sp3: Laya.Sprite3D = res.create() as Laya.Sprite3D; this.scene3d.addChild(sp3); }); }) La...

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

425. img点击事件。点击图片外,也触发了事件。请问怎么解决 [ 62%]

...Laya.Stage.ALIGN_CENTER; Laya.stage.alignV = Laya.Stage.ALIGN_MIDDLE; Laya.loader.load("res/img/m1.jpg",Laya.Handler.create(this,load)); function load(){ let ctn2=new Laya.Sprite(); Laya.stage.addChild(ctn2); var gq=new Laya.Sprite(); gq.loadImage("res/img/m1.jpg",100,100,100,100);   ctn2.addChild(...

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

426. SCALE_FIXED_WIDTH适配屏幕的问题 [ 62%]

...Laya.View.regComponent("ScaleButton", ScaleButton);             Laya.loader.load("res/atlas/com/loading.atlas", Laya.Handler.create(this, this.loadGame));         }         private loadGame(): void {             var resArray = [                 { url: "res/atlas/lobby/cre...

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

427. 富文本使用图集 [ 61%]

... [error] Undefined class: ani 这是我哪里用的不对吗?   Laya.loader.load("res/1.json", Handler.create(this, createAnimation), null, Loader.ATLAS);  public function createAnimation():void         {             var appendHtml:HTMLDivElement=new HTMLDivElement();       ...

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

428. 当使用Image作为一个对象的遮罩时,设置Image的ScaleX为0时遮罩失效! [ 61%]

... // 程序入口 class GameMain{ constructor() { Laya.init(1280,720); Laya.loader.load([{url:"res/atlas/comp.json",type:Laya.Loader.ATLAS}],Laya.Handler.create(this,this.loaded,null)); } private loaded():void{ var img:Laya.Image = new Laya.Image(); img.skin = "comp/img_pro.png"; Laya.stage.addChild(...

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

429. 设置适配SCALE_FIXED_WIDTH,结果少部分andriod机型不能正确适配屏幕 [ 61%]

...Laya.View.regComponent("ScaleButton", ScaleButton);             Laya.loader.load("res/atlas/com/loading.atlas", Laya.Handler.create(this, this.loadGame));         }         private loadGame(): void {             var resArray = [                 { url: "res/atlas/lobby/cre...

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

430. 加载UI为什么总是加载白底 [ 61%]

...; //设置stage颜色s Laya.stage.bgColor = "#ffffff"; //加载资源 Laya.loader.load("res/atlas/comp.json",Laya.Handler.create(this,onLoaded),null,Laya.Loader.ATLAS) })(); function onLoaded(){ var _start = new start(); Laya.stage.addChild(_start); } })(); var start = (function(_super){ function st...

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