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

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

131. 类似古文显示方式脚本,文字垂直显示,可以控制显示速度出现打字效果等 [ 86%]

...alSpace: number = 5; private sprite: Laya.Sprite; constructor() { super(); this.sprite = new Laya.Sprite(); } drawText(x: number, y: number, w: number, h: number) { console.log(2222); var j = 0;//控制行列 var printNumber = 0;//当前输出字数 var fonts = this.fontSize + "px" + " " +this.font ...

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

132. 为何定时时钟函数可以执行,但是得到的值却不会实时刷新 [ 86%]

...时钟函数可以执行,但是得到的值却不会实时刷新 比如 this.loadNum=0; //资源加载进度中函数 _proto_.onProgress = function(){ //显示加载进度 Laya.timer.loop(100,this,this.ontime); this.txt_load.text = "资源加载中,当前进度:" + parseInt(this.loadNum) + "%"...

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

133. dialog的popup方法不会关闭其他弹窗 [ 86%]

...xtends ui.loginUI { normalDialog: NormalDialog; constructor() { super();  this.btn_signin.on(Laya.Event.CLICK, null, () => { this.showDialog("登录成功") }); this.btn_register.on(Laya.Event.CLICK, null, () => { this.showDialog("注册功能暂未开放") });  }  showDialog(context: strin...

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

134. 关于下拉列表 [ 86%]

...拉列表 真的,真是服LAYA,哎,搞了我一晚上,真心不行 this.small_map.selectHandler = new Laya.Handler(this, onSelect_small); this.big_map.selectHandler = new Laya.Handler(this, onSelect_big); function onSelect_small(e) { Laya.big_switch = 0 Laya.maptype = "small" this.now_map.te...

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

135. laya.ui.ProgressBar_API3.0 [ 86%]

...resource/ui/progress.png", "resource/ui/progress$bar.png"], Handler.create(this, onLoadComplete));//加载资源。 } private function onLoadComplete():void { progressBar = new ProgressBar("resource/ui/progress.png");//创建一个 ProgressBar 类的实例对象 progressBar 。 progressBar.x = 100;/...

来源: Laya3.0_api 发布时间: 20231115

136. 自定义对话框设置zOrder后,关闭时报错 [ 86%]

... CountdownBar = (function () { function countdownBar() { PauseDialog.super(this); this.name = 'CountdownBar'; Laya.stage.addChild(this); this.zOrder = 100; this.count = 4; this.countLabel.text = '' + this.count; Laya.timer.loop(1000, this, this.countdown); } Laya.class(countdownBar, "CountdownBar", ...

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

137. 使用Laya.loader.load加载Laya.Loader.FONT位图字体文件时就会出现无限循环加载,一直到浏览器奔溃 [ 86%]

....stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628";   this.loadFont(); }   loadFont() { const  BitmapFont = Laya.BitmapFont, Handler = Laya.Handler;   Laya.loader.load([{     url: ['res/bitmapFont/test.fnt'],     type: Laya.Loader.FONT }], Handler.create(this, () => { ...

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

138. 关于下拉列表的选择触发 [ 86%]

关于下拉列表的选择触发 this.small_map.selectHandler = new Laya.Handler(this, onSelect_small); this.big_map.selectHandler = new Laya.Handler(this, onSelect_big); function onSelect_small(e) { Laya.big_switch = 0 Laya.maptype = "small" this.now_map.text = "当前地图:" + this.small_map....

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

139. bitmapFont.loadFont()加载多个地址导致位图输出重 [ 85%]

...t.loadFont()加载多个地址导致位图输出重 构造函数中是 this.setDataByTextureList("\n6+", ["res/fontadd/num6.fnt","res/fontadd/num+.fnt"]);     private setDataByTextureList(value:string, urls:string[]){ for(var i=0;i<urls.length;i++){ var bitmapFont: BitmapFont = new BitmapFo...

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

140. 音频-播放演示 [ 85%]

...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { const Event = Laya.Event; var gap = 10; //创建一个Sprite充当音效播放按钮 let soundButton = this.createButton("播放音效"); soundButton.x = (Laya.stage.width - soundButton.width * 2 + g...

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