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

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

51. 【简单跑酷--JS版】---Lv.5 玩家踩地板 [ 60%]

...直在动 不太适合我们调试代码 我们打开Floor.js 找到 Laya.timer.frameLoop(1, this, this.onLoop); 把这一行代码先给注释了 接着 我们先理一理自己的思路 我们要做玩家踩在地板上 那就要用到碰撞检测 上图中紫色的小点点是 两个物体的 坐...

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

52. 计时器-延迟执行 [ 60%]

...nt.CLICK, this, onDecreaseAlpha1); //定时执行一次(间隔时间) Laya.timer.once(3000, this, onComplete1); } function onDecreaseAlpha2(e) { //移除鼠标单击事件 button2.off(Event.CLICK, this, onDecreaseAlpha2); //定时执行一次(基于帧率) Laya.timer.frameOnce(60, this, onComplete2)...

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

53. 问一下这个问题要怎么改啊? [ 60%]

...已经无效) 关于逻辑贞更新间隔机制、时间和其他一些Timer相关的问题 问题状态 最新活动: 2017-05-22 18:18 浏览: 834 关注: 2 人 cuixueying • 2017-05-22 20:40 要不,你把你可以运行但是报错的例子发我下,我来测试下吧! anlijames • 2017-...

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

54. Sprite-旋转缩放 [ 60%]

...e.width / 2; this.ape.y = Laya.stage.height / 2; this.scaleDelta = 0; Laya.timer.frameLoop(1, this, this.animate); } animate() { this.ape.rotation += 2; //心跳缩放 this.scaleDelta += 0.02; let scaleValue = Math.sin(this.scaleDelta); this.ape.scale(scaleValue, scaleValue); } } new Sprite_RoateAnd...

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

55. laya.utils.PerfHUD [ 60%]

...显示在屏幕之前调用,一般用于延迟计算数据。 Node clearTimer(caller:*, method:Function):void 清理定时器。功能同Laya.timer.clearTimer()。 Node  config(w:int, h:int):voidPerfHUD contains(node:Node):Boolean 当前容器是否包含指定的 Node 节点对象 。 Node ...

来源: Laya2.0_api 发布时间: 20190513

56. 关于大量图片加载绘制后的内存暴增的疑问 [ 60%]

... Sprite(); Laya.stage.addChild(sp); //每隔0.05秒出现下张图片 Laya.timer.loop(50,this,onLoop); } private function onLoop():void { //更改texture的纹理,逐一显示不同的image chageTexture(); //如果texture有值,进行绘制并排序 if(texture) { sp.graphics.drawTexture(texture,...

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

57. 内存优化方式(ActionScript-2D进阶篇(AS3)-性能优化) [ 59%]

...E_SHOWALL; //背景颜色 Laya.stage.bgColor = "#232628"; //帧循环 Laya.timer.frameLoop(1,this,onFrame); } private function onFrame():void { //如果创建对象时间为100帧间隔后 if(createTime>=100) { //每200帧间隔创建30个雪花 for(var i:int=0;i640+20||img1.scaleX(图2-1) 在...

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

58. UI-ProgressBar [ 58%]

...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_示例 发布时间: 20251209

59. sk文件加载 [ 58%]

...                                    Laya.timer.once(2000,this,function(){                 sk.destroy(true)                 sk = null;                 Laya.loader.clearRes("res/sk/cow.sk");               ...

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

60. Sprite-容器 [ 58%]

...s ); } this.apesCon.pos(Laya.stage.width / 2, Laya.stage.height / 2); Laya.timer.frameLoop(1, this, this.animate); } animate() { this.apesCon.rotation += 1; } } new Sprite_Container();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import Event = Laya.Event; import Browser = La...

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