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

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

121. 官方文档里的位图字体的制作与使用JS 跑不通 以及 文档的几个问题 [ 87%]

...个位图字体教程的代码应该放在哪里,怎么引用,其中的this是指? 我自建了单独的文件,并在Main里import了它,输出看是undefined。   5.几处的路径不一致,它们的关系是?  a.如图:把test_0.png名字改为test.png,保证跟fnt文件同名。...

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

122. Button销毁时,未对_clickHandler进行回收 [ 86%]

... 源代码: destroy(destroyChild = true) { super.destroy(destroyChild); this._bitmap && this._bitmap.destroy(); this._text && this._text.destroy(destroyChild); this._bitmap = null; this._text = null; this._clickHandler = null; this._labelColors = this._sources = this._strokeColors ...

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

123. 在UI编辑器里可以看到位图字体,但是进入游戏后没有显示,怎么解决 [ 86%]

...要这么做 2.ziti类中预加载字体,加载完成回调你写的是this.onLoaded。导致下边onLoaded函数根本就没有走,也更走不到init函数中 3.init函数中你给test的text赋值为this.labelFont.text,根据你这一步的做法可以猜到你是想用UI界面中的那个...

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

124. 其他引擎的Demo-Example_04 [ 86%]

... Browser.width; private h:number = Browser.height; private slideX:number = this.w / 2; private slideY:number = this.h / 2; private speedInfo:Text; constructor() { Laya.init(this.w, this.h, WebGL); this.createText(); this.start(); } private start():void { for (var i:number = 0; i this.w) { this.stars...

来源: Laya_示例 发布时间: 20251130

125. 初学者的提问,如何在场景中获取到对象 [ 86%]

...要如何写,如下: btnclick.js 如下: onAwake(){         this.btn = this.owner;         this.btn.on(Laya.Event.CLICK,this,this.cli)                    }         cli(){         /// how to 获得text 对象,并改变text的值???  ...

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

126. 骨骼动画进阶(JavaScript-2D进阶篇(JS)-动画进阶) [ 86%]

...建动画模板 templet=new Laya.Templet(); templet.on(Laya.Event.COMPLETE,this,parseComplete); templet.on(Laya.Event.ERROR,this,onError); //加载动画文件 templet.loadAni("res/spine/goblins/goblins.sk"); function onError() { console.log("parse error"); } function parseComplete() { //创建第...

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

127. 如何在3d场景中添加文字 [ 86%]

...rGameScene:Laya.Camera; private _outPos:Laya.Vector3 = new Laya.Vector3(); this.txtName = new Laya.Text(); this.txtName.color = "#FFFFFF"; this.txtName.text = this.playerName; this.txtName.fontSize = 18; this.txtName.font = "Arial"; this.txtName.bold = true; this.txtName.align = "left"; Laya.stage.a...

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

128. 骨骼动画进阶(ActionScript-2D进阶篇(AS3)-动画进阶) [ 86%]

...; //创建动画模板 templet = new Templet(); templet.on(Event.COMPLETE, this, parseComplete); templet.on(Event.ERROR, this, onError); //加载动画文件 templet.loadAni("res/spine/goblins/goblins.sk"); } private function onError():void { trace("parse error"); } private function parseComplete():...

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

129. 如何获取实时更新的动态数据,数据在文本中 [ 86%]

... 运用frameloop重复执行加载文本资源函数Laya.stage.frameLoop(1,this,this.Repeat,null,true);这是加载资源的函数内的代码loadPosition():void{ /* let resArray:Array<any>=[ {url:"eyeimf.txt",type:Laya.Loader.TEXT} ] Laya.loader.load(resArray,Laya.Handler.create(this,this.Onl...

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

130. bind函数的作用 [ 86%]

...rotobuf.load(["proto/game.proto", "proto/user.proto"], this.onProtoLoaded.bind(this)); a15715740412 • 2018-01-30 16:31 /** * For a given function, creates a bound function that has the same body as the original function. * The this object of the bound function is associated wit...

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