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

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

331. 位图字体的制作与使用(TypeScript-LayaAir基础篇(TS)-文本) [ 57%]

...册的字体起个名 private fontName: string = "diyFont"; constructor() {super();} onAwake(): void { //加载位位图字体 this.loadBitmapFont(); } /** * 实例化位图字体类,并加载位图字体 */ loadBitmapFont(): void { let bitmapFont: Laya.BitmapFont = new Laya.BitmapFont(); bitmapFo...

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

332. 如何自定义Shader(TypeScript-3D基础(TS)-LayaAir3D之Shader) [ 57%]

...script export class CustomMaterial extends Laya.Material { constructor() { super(); //设置本材质使用的shader名字 this.setShaderName("CustomShader"); } } ``` #### 4.使用自定义材质 ​ 在使用自定义材质之前,一定要记得初始化自己的Shader。LayaAir中自带的材质...

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

333. LayaBox HelloWorld实战 [ 57%]

...World!export default class HelloWorld extends Laya.Scene { constructor() { super(); HelloWorld.instance = this; } onBtnShowClick(){ var dialog = new Laya.Dialog(); dialog.width=300; dialog.height=600; //var bg = new Laya.Image('comp/img_bg.png'); //dialog.addChild(bg); var button = new Laya.Button('...

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

334. 下拉选项框组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 57%]

...资源来自“引擎API使用示例” pageWidth: number; constructor() { super(); } // 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { Laya.loader.load(this.skin).then(() => { let ComboBox: Laya.ComboBox = new Laya.ComboBox(t...

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

335. 对象池 · LayaAir3.4 · 引擎文档 · LAYABOX [ 57%]

...的方式进行管理对象池: export class EffectA { constructor() { super(); } static create(): EffectA { Pool.getItemByClass(EffectA); } recover(): void { Pool.recoverByClass(this); } } export class EffectB { constructor() { super(); } static create(): EffectB { Pool.getItemByClass(EffectB); }...

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

336. renderType设置成instance,单例模式怎么使用的啊 [ 57%]

...来自: liwenhua public function GameUI():void {             super();             GameUI.instance = this;                      }   设置单例之后,runtime脚本里面就 指定一下,就ok了,免去写单例代码。 2019-05-21 1 0 分享 微博 ...

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

337. 在微信小游戏中,主域中显示开发域的list为什么显示不全? [ 57%]

...mg: Laya.Image;         //private text: Laya.Label; constructor(){ super(); this.size(Item.WID, Item.HEI); this.img = new Laya.Image();             //this.text = new Laya.Label(); this.addChild(this.img);             //this.addChild(this.text); } public setImg(src: st...

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

338. 加载.lh文件 运行后黑屏 无法显示 [ 57%]

...:boolean;     private twoFirst:boolean; constructor(){         super(); this._scene = null;      this._text = null;         this._camera = null;         this.rotation = new Laya.Vector3(0, 0.01, 0);      this.lastPosition = new Laya.Vector2(0, 0);      this.di...

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

339. 如何才能生成scene配套的代码 [ 57%]

...lic var tipLbll:Label; override protected function createChildren():void { super.createChildren(); loadScene("test/TestScene"); } } } 2018-10-24 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 Laya_Xq 赞同来自:...

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

340. Laya List给子元素添加事件后,滚动事件被劫持了 [ 57%]

...问题 export default class StoreItem extends Laya.Box { constructor() { super(); this.size(195, 210); }  } 附件 : --> ListDemo.zip 2019-07-11 添加评论 已悬赏10元 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 3 个回复 Another 赞同...

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