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

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

1361. Laya.Sprite loadImage 参数问题 [ 83%]

...L); //设置舞台背景色 Laya.stage.bgColor = "#ffffff"; //原始位图 this.createImg(100,50); //红色滤镜 this.creteRedFilter(); //灰色滤镜 this.createGrayFilter(); } /**创建位图**/ private createImg(w:number,h:number):Laya.Sprite{ var Img:Laya.Sprite = new Laya.Sprite(); //添加到...

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

1362. 相对布局,重新适应问题 [ 83%]

...手动监听Laya.stage.on(Laya.Event.RESIZE,,)来二次适配吗 // this.imgBG.left = 0 ; // this.imgBG.right = 0 ; // this.imgBG.top = 0 ; // this.imgBG.bottom = 0 ;   还有一个就是 layoutEnabled 属性 在什么情况用!   2017-09-18 添加评论 免费帖 --> 分享 微博 QZONE ...

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

1363. 新人求助:onStart赋值为什么在onUpdate会输出一次为空 [ 83%]

...          }     onStart():void{                this.lab=this.owner as Laya.Label;         }         onUpdate():void{         if(this.lab==null){             console.log("lab为空");             return;         }  ...

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

1364. 3D项目,,模型默认朝向的问题,,, [ 83%]

...向laya的正方向,在场景里面创建出来2个,   第一个: this._mainPlayer.transform.position = new Vector3( 0,0,1 ); 第二个: this._npc.transform.position = new Vector3( 0,0,4 );   然后调用: this._npc.transform.lookAt( this._mainPlayer.transform.position,new Laya.Vector3(0...

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

1365. 封装类的时候 怎么在类中表示自身? [ 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

1366. 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

1367. 缓动-简单的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_示例 发布时间: 20260303

1368. 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

1369. 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

1370. 循环监听按钮,如何进行传参和接受参数 [ 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