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

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

1361. 封装类的时候 怎么在类中表示自身? [ 83%]

...ng"); // Laya.stage.addChild(box); bg1.loadImage("../bin/background.png"); this.addChild(bg1); bg2.loadImage("../bin/background.png"); bg2.pos(0,-852); this.addChild(bg2); 用this.addchild老是出错 2016-09-26 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请...

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

1362. 2.0按钮添加事件报错 cannot read property 'on' fof undefined [ 83%]

...ned class GameLogin extends ui.login.login_bgUI { constructor() { super(); this.btn_register.on("click", this, this.ToRegisterPage); } ToRegisterPage() : void { this.loadScene("login/register_page"); } }   //调用on的时候 直接会报Cannot read property 'on' of undefined   我再把生成的u...

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

1363. 缓动-简单的Tween [ 83%]

...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { const Sprite = Laya.Sprite, Tween = Laya.Tween; let terminalX = 200; let characterA = this.createCharacter("res/cartoonCharacters/1.png"); characterA.pivot(46.5, 50); characterA.y = 100; let characte...

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

1364. Animation创建时无法获取高度 [ 83%]

...无法获取高度 var roleAni = new Laya.Animation(); roleAni.loadImages( this.aniUrls( v1, v2, tip, frames ) ).play(); roleAni.pos(x,y); this.root.addChild( roleAni ); roleAni.pivotY = roleAni.getBounds().height; console.log("---> ", roleAni.getBounds() ); 打印为 ---> Rectangle {x: 0, y:...

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

1365. AS项目怎么使用类成员变量 [ 83%]

...变成了window,所以你需要绑定下作用域。onAssetsLoaded.bind(this) 2017-09-27 1 4 分享 微博 QZONE 微信 Monica - 知识达人 赞同来自: 你AS中是怎么写的? 2017-09-27 0 1 分享 微博 QZONE 微信 ljy328803417 赞同来自: 如图 2017-09-27 0 7 分享 微博 QZONE 微...

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

1366. 循环监听按钮,如何进行传参和接受参数 [ 83%]

...这里监听循环按钮 for (let i: number = 1; i <= 2; i++) { let e = this.typeBox.getChildByName('btn' + i) as Laya.Image;               console.log(e); e.on(Laya.Event.CLICK, this, this.onBtnClick); }   按钮事件 private onBtnClick(event:Laya.Event): void {         le...

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

1367. laya升级到2.0.0beat4版本,加载场景出现的bug [ 83%]

...载:Laya.loader.create("Laya/Conventional/Map_SCC.ls",Laya.Handler.create(this,this.LoadCompleteHandler)); 加载完成后: var scene3D:Laya.Scene3D = Laya.loader.getRes(this.mSceneName) as Laya.Scene3D; Laya.stage.addChild(scene3D); 异常: TypeError: node._setParent is not a function preload.js:55...

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

1368. Laya Label text不显示 [ 83%]

Laya Label text不显示 public static showNativeGroup() { /* if (this.nativeGroup) { return; } */ var self = this; Laya.View.load(SdkUtil.sdkDomain + "sdkres/laya/native/NativeGroup.json", new Laya.Handler(this, function (group: Laya.View) { /* if (this.nativeGroup) { return; } */ self.nativeGroup...

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

1369. 微信加载文件失败没有回调 [ 83%]

...rror")} LoadOK(){console.log("LoadOK")}   Laya.loader.on(Laya.Event.ERROR,this,this.LoadError) Laya.loader.load("不存在的图片URL",Laya.Handler(this,this.LoadOK));     发布成微信小游戏版本在真机微信上运行,发现这2个回调都没执行。   2018-09-20 添加评论 免...

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

1370. graphics.drawTexture()如何改变层级 [ 83%]

...次的低 ,(除了调换绘制顺序,顺序没法改变) 如下: this.bg.graphics.drawTexture(this.bgTexture, 100, 734, 64, 76); this.bg.graphics.drawTexture(this.bgTexture, 131, 703, 64, 76); 怎么让第二行绘制图像的层级比第一行低 2018-01-08 添加评论 免费帖 --> 分...

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