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

大约有 1,491 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0060 秒)

721. 2D方向光 · LayaAir3.3 · 引擎文档 · LAYABOX [ 71%]

...如,设置在屏幕左上角 this.displayText.y = 10; this.owner.scene.addChild(this.displayText); // 在场景中添加文本显示 } onUpdate(): void { // 更新时间 this.dayTime = (this.dayTime + Laya.timer.delta / 1000) % this.dayDuration; const totalMinutes = Math.floor((this.getAdjustedPro...

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

722. 不带格式后缀的图片无法成功加载 [ 71%]

...odee.width = 500 nodee.height = 250 nodee.x = 100 nodee.y = 350 Laya.stage.addChild(nodee) }));上面这个图片无法正常显示,打印 texture 的宽是 undefined,如果是带后缀的图片,比如.jpg就可以正常展示图片。 附件 : --> ImageDemo.zip 2021-10-26 添加评论 免费...

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

723. bug,ChainCollider.points第二次设置,会报错! [ 71%]

...is.bullet); flyer.pos(Laya.stage.mouseX, Laya.stage.mouseY); this._gameBox.addChild(flyer); this._chains.points="35,35,80,80";     //****新增代码*****,需增加private _chain; } /**开始游戏,通过激活本脚本方式开始游戏*/ startGame(): void { if (!this._started) { this._start...

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

724. 关于遍历产生的sprite的点击事件,急,大神帮看哈 [ 70%]

...0;i<5;i++){    sp=new Laya.Sprite();    sp.index=i;    Laya.stage.addChild(sp); } 类似这样遍历出来的sprite 我怎么给每个sprite添加一个点击事件获得对应的sp.index值呢! 2017-02-21 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀...

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

725. 多行输入文本组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 70%]

..."; ta.pos(100, 15); ta.size(375, 355); ta.padding = "70,8,8,8"; this.owner.addChild(ta); } } (代码中的图片资源来自“引擎API使用示例”项目,开发者可以自行创建下载) 运行结果: (图2-1) Copyright ©Layabox 2025 all right reserved,powered by LayaAir Engine...

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

726. 粒子中引用的图片能合图吗 [ 70%]

...t.x = this.width / 2;     part.y = this.height - 100;     Laya.stage.addChild(part); } dian.png和dian.part放到demo的comp目录下。 dian.zip 2017-08-03 0 0 分享 微博 QZONE 微信 cuixueying 赞同来自: 可否把可以体现问题的能运行的例子上传下呢,我测试没有重...

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

727. 创建动画时画布的width和height与 实例化后的ani.size(width, height) 有什么区别 [ 70%]

... this.aniBirdSing.height); this.aniBirdSing.mouseEnable = true; Laya.stage.addChild(this.aniBirdSing); } 根据这个代码,我认为鼠标点击区域在图片左下区域,但结果是图片左上区域,求解? 如果我想让图片的点击区域是图片左下区域,应该如何出来...

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

728. sprite.loadImage加载图片怎么设置要显示的x,y坐标和宽高? [ 70%]

...prite(); sp.loadImage("res/smallWalkRight.png"); sp.pos(gs.x, gs.y); layer.addChild(sp); } } new GameMain();sprite显示出了整张图片:   附件 : --> 2019-02-14 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回...

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

729. 动画不显示 [ 70%]

...         m_mapLayer = new Sprite();             Laya.stage.addChild(m_mapLayer);             //添加角色对象             m_Role = new Animation();             Laya.stage.addChild(m_Role);                          //异步加载资源 ...

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

730. 粒子图片错误 [ 70%]

...a.Particle2D(settings); yan.emitter.start(); yan.play(); this.particlesPos.addChild(yan);   编辑器里面设置是对的 但是在网页上运行,图片就错了,变成了打包的atlas的一张整图 这是为什么? 附件 : --> 2018-12-20 添加评论 免费帖 --> 分享 微博 QZONE ...

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