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

大约有 158 项符合查询结果, 库内数据总量为 30,723 项。 (搜索耗时: 0.0034 秒)

31. UI-ProgressBar [ 81%]

...dler = new Handler(this, onChange); Laya.stage.addChild(progressBar); Laya.timer.loop(100, this, changeValue); } function changeValue() { if (progressBar.value >= 1) progressBar.value = 0; progressBar.value += 0.05; } function onChange(value) { console.log("进度:" + Math.floor(value * 100) + "%"...

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

32. UI-ProgressBar [ 81%]

..."; this.progressBar.changeHandler = new Handler(this, this.onChange); Laya.timer.loop(100, this, this.changeValue); } changeValue() { if (this.progressBar.value >= 1) { this.progressBar.value = 0; } this.progressBar.value += 0.05; } onChange(value) { console.log("进度:" + Math.floor(value * 100)...

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

33. Laya.timer缩放问题 [ 80%]

Laya.timer缩放问题 Laya.timer.loop(1,this,this.fun);将Laya.timer.scale = 0.1;没有效果; Laya.timer.frameLoop(1,this,this.fun)将Laya.timer.scale = 0.1;则可以看到方法调用的频率变低了,这是为什么? 2019-10-31 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有...

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

34. 骨骼动画-换装 [ 79%]

...ature.on(Event.STOPPED, this, completeHandler); play(); changeSkin(); Laya.timer.loop(1000, this, changeSkin); } function changeSkin() { mCurrSkinIndex++; if (mCurrSkinIndex >= mSkinList.length) { mCurrSkinIndex = 0; } mArmature.showSkinByName(mSkinList[mCurrSkinIndex]); } function completeHandler()...

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

35. Timer Handler被覆盖 [ 79%]

Timer Handler被覆盖   class Timer   _getHandler(caller, method) { var cid = caller ? caller.$_GID || (caller.$_GID = ILaya.Utils.getGID()) : 0; var mid = method.$_TID || (method.$_TID = (Timer._mid++) * 100000); return this._map[cid + mid]; }   当游戏玩的功能多时间长了,随着cal...

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

36. 如何停止重复执行Laya.timer.frameLoop(1,this,onDrag); [ 79%]

如何停止重复执行Laya.timer.frameLoop(1,this,onDrag); 如何让重复执行的函授停止,比如Laya.timer.frameLoop(1,this,onDrag);中的onDrag。谢谢~ 2017-02-23 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2...

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

37. 骨骼动画-换装 [ 79%]

...STOPPED, this, this.completeHandler); this.play(); this.changeSkin(); Laya.timer.loop(1000, this, this.changeSkin); } changeSkin() { mCurrSkinIndex++; let skinLength = mSkinList.length; if (mCurrSkinIndex >= skinLength) { mCurrSkinIndex = 0; } mArmature.showSkinByName(mSkinList[mCurrSkinIndex]); } c...

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

38. ProgressBar 代码问题 [ 77%]

...ading : Onloading = new Onloading();     loading.popup(true);     Laya.timer.loop(100, this, loading.changeValue); }); 进度条代码: import Handler = Laya.Handler; export class Onloading extends ui.LoadingUI{        constructor(){        super();        this.loadingBar.changeHandl...

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

39. 进度条组件 · LayaAir3.0文档 · LAYABOX [ 77%]

... this.loadText.text = "资源加载中……"; // 测试加载效果 Laya.timer.loop(100, this, this.changeProgress); } //这里仅模拟加载演示效果 changeProgress(): void { this.progressBar.value += 0.05; //每次进度条的改变量 if (this.progressBar.value == 1) { this.loadText.text = "...

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

40. 关于定时器嵌套问题 [ 76%]

关于定时器嵌套问题 假设有一个定时器laya.timer.loop(1000,this,update),在update方法中包含另一个定时器laya.timer.loop(1000,this,show),这种情况两者会互相产生干扰吗?还是各算各的时间? 2018-04-05 添加评论 免费帖 --> 分享 微博 QZONE 微信 没...

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