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

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

371. 分享:简单聊天室 [ 76%]

... function onKeyDown(e:Event):void { // 当按下enter健自动发送文字 if(e.keyCode==13) { change(str); } } // 发送文字样式二,如果input有值的话,发送input的内容 private function onSendClick1():void { change(str2); } // 发送文字样式一,如果input有值的话,发送...

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

372. 性能测试-卡通人物 [ 76%]

...(charactor) { charactor.x += moveSpeed; charactor.rotation += rotateSpeed; if (charactor.x > Laya.stage.width + extraSpace) { charactor.x = -extraSpace; } } } new PerformanceTest_Cartoon();module laya { import Sprite = Laya.Sprite; import Loader = Laya.Loader; import Browser = Laya.Browser; import H...

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

373. 1.5.4_beta,动画播放完毕的监视器很大概率会不起作用了 [ 76%]

...anaimaname)     {         // 第一次创建一个动画         if (null == this.mAnimaCur)         {             this.mAnimaCur = new laya.display.Animation();             this.mAnimaCur.interval = 100;             this.addChild(this.mAnimaCur);         }     ...

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

374. 什么情况下 加载的图片没有显示 没有报错内存控制也没有内存超出 [ 75%]

...值 不知道是否正常,我修改了下 __proto.addSize=function(add){ if (add){ if(add > 0){ if (this.autoRelease){ ((this._memorySize+add)> this.autoReleaseMaxSize)&& (this.garbageCollection((1-this._garbageCollectionRate)*this.autoReleaseMaxSize)); } this._memorySize+=add; } } }...

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

375. 处理Android后退按钮 · LayaAir3.0文档 · LAYABOX [ 75%]

...LayaNative只有Android版有这两个函数。 js示例如下: var n=3; if(window.conch){ window.conch.setOnBackPressedFunction(()=>{ console.log('press back '+n); if(n-- <=0){ window.conch.exit(); } else{ //用户自己的代码,例如返回上层页面 } }); } Copyright ©Layabox 2022 a...

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

376. 加载-加载序列 [ 75%]

...(texture) { console.log(texture.url); // 恢复默认并发加载个数。 if (++numLoaded == 3) { Laya.loader.maxLoader = 5; console.log("All done."); } } } new Loader_Sequence();module laya { import Texture = Laya.Texture; import Handler = Laya.Handler; export class Loader_Sequence { private numLo...

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

377. 定时器 · LayaAir3.4 · 引擎文档 · LAYABOX [ 75%]

...ler = this._create(false, true, delay, caller, method, args, coverBefore); if (handler) handler.jumpFrame = jumpFrame; } 使用示例如下: const { regClass } = Laya; import { RuntimeScriptBase } from "./RuntimeScript.generated"; @regClass() export class RuntimeScript extends RuntimeScriptBase { ...

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

378. 自己做的小游戏,很想把它发到微信小游戏里,但是太大了,就来这里分享一下吧 [ 75%]

... 提交 11 个回复 Damon 赞同来自: 华dee. 这是我见过最长的if else 2019-07-30 1 0 分享 微博 QZONE 微信 183*****693 赞同来自: 华dee. 好长的 else if 2019-07-31 1 0 分享 微博 QZONE 微信 Laya_Aaron 赞同来自: 感谢分享 2018-08-13 0 0 分享 微博 QZONE 微信 倍...

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

379. 真机调试 开启子域后 提示出现window is not defined [ 75%]

...game.js里面weapp_adapter.js是放在第一处的 仍然有这个问题 if ((typeof swan !== 'undefined') && (typeof swanGlobal !== 'undefined')) { require("swan-game-adapter.js"); require("libs/laya.bdmini.js"); } else if (window&&window.wx) { require("weap...

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

380. 3D粒子特效第一次卡顿最终解决方案 [ 75%]

...     private compileShader(model: any): void { //如果是粒子特效 if (model instanceof Laya.ShuriKenParticle3D) {             var shuriKenParticle3D: Laya.ShuriKenParticle3D = model as Laya.ShuriKenParticle3D;             var render:Laya.ShurikenParticleRenderer = sh...

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