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

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

1481. 为啥 增加 Text ,drawcall 暴增 ?????????????? [ 81%]

...ui_imgs/img_10103.png"; fish.scoreItem.sizeGrid = '0,10,0,10'; var price = this.getFishVal('10001', 3); var length = String(price).length; var w = length * 16 + 15 + 40; fish.scoreItem.width = w; fish.scoreItem.x = fish.getBox().x - fish.scoreItem.width/2; fish.scoreItem.y = fish.getBox().y - fish.s...

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

1482. 陀螺仪和加速计使用问题 [ 81%]

...仪和加速计使用问题 Laya.Gyroscope.instance.on(Laya.Event.CHANGE,this,this.onDeviceorientation);  Laya.Accelerator.instance.on(Laya.Event.CHANGE,this,this.onMotoin); 官网陀螺仪和加速计例子中的上面两句运行时都报 Cannot read property 'instance' of undefined 的错误 附...

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

1483. 动画-图集动画 [ 81%]

...ya.stage.bgColor = "#232628"; Laya.loader.load(AniConfPath, Handler.create(this, createAnimation), null, Loader.ATLAS); })(); function createAnimation() { var ani = new Animation(); ani.loadAtlas(AniConfPath); // 加载图集动画 ani.interval = 30; // 设置播放间隔(单位:毫秒) ani.in...

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

1484. 脚本组件继承于 Laya.Script。 其中的_update方法,多长时间会调用一次? 可以设置调用时间吗? [ 81%]

... * @param delay 延迟时间(单位为毫秒)。 * @param caller 执行域(this)。 * @param method 定时器回调函数。 * @param args 回调参数。 * @param coverBefore 是否覆盖之前的延迟执行,默认为 true 。 */ once(delay: number, caller: any, method: Function, args?: Array&lt...

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

1485. app 的预加载问题 [ 81%]

...n.json","type":Loader.ATLAS}, ]; Laya.loader.load(resarray, Handler.create(this, this.preloadLoaded), Handler.create(this, this.onProgress,null,false)); 这个时候这个资源是通过app本地加载还是网上加载的? 2.dcc 有之前安装到手机上的app (a版本),后面服务器又...

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

1486. list的render复用问题 [ 81%]

...拖第五个item也叫item0, 通过list.selectHandler = new Laya.Handler(this, this._OnSelect); function _OnSelect(){ //选中的render上加个选中框, var selection = this.visualizeList.selection;         selection.addChild(this.m_CenterDiv.imgSelect); } 第五个render也会有选...

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

1487. [LayaAir3]自定义字体在移动浏览器不起作用 [ 81%]

...{ url: respath.font_SemiBold, type: Laya.Loader.TTF }, Laya.Handler.create(this, (obj: object) => { // 第二个参数:成功回调       console.log("预加载字体结束>>>>", obj)       if (config.H_SCREEN) {         this.loadTopBarUI()       } else {         th...

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

1488. Laya.Animator没有动画播放完事件 [ 81%]

...件 官方文档错误,我就不发demo了如下是官方文档里的代码this.ani = role3D.getChildAt(0).getComponentByType(Laya.Animator) as Laya.Animator; //监听默认动画完成后播放站立动画 this.ani.on(Laya.Event.COMPLETE,this,this.onAniComplete);但 Laya.Animator跟本没有继承...

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

1489. 发布QQ玩一玩,使用VScode,windows环境下打包问题。 [ 81%]

...     __proto._setClipChanged=function(){             if (!this._clipChanged){                 this._clipChanged=true;                 this.callLater(this.changeClip);             }         } 2018-10-27 0 0 分享 微博 QZONE 微...

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

1490. Button和下面的3D物体重叠,点击button,3D物体会同时响应自己的鼠标脚本 [ 81%]

...UI元素的 mouseEnable 设置为 true ,接收鼠标点击 onAwake() { this.isClick = false; //对舞台stage添加点击事件(这里由于有scene的缘故,点击空白处返回的对象是scene) Laya.stage.on(Laya.Event.CLICK,this,function(e) { if(e.target.name == "scene的名字") { this...

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