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

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

71. JQ集成到Laya二次封装 [ 85%]

...======= demo2 ======================= JQ(aWater).on('click', function () { console.log( JQ(this).index() );//不传 匹配父级元素下的子元素开始算索引 // console.log( JQ(this).index(aWater) );//传数组,从当前数组开始算索引 // console.log( JQ(this).siblings(aWater).remove(...

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

72. [LayaAir3]list.selectHandler [ 85%]

...一index的选项    private onSelect(index: number): void {         console.log("当前选择的索引:" + index);         let checkBoxItem:Laya.CheckBox = this._list.getChildAt(index).getChildAt(0) as Laya.CheckBox;         if(checkBoxItem!=null){                       ...

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

73. js环境下使用Loader加载图片在Sprite对象的.on函数无效 [ 84%]

...s.bgimg.mvtoy=movetoy; this.bgimg.speedx=speedx; this.bgimg.speedy=speedy; console.log("funmovebg"+movetox); Laya.timer.frameLoop(speed, this, funbg);     2017-10-25 0 2 分享 微博 QZONE 微信 yinglei999 赞同来自:     var Loader = Laya.Loader;     var loaderHandler = Laya.Handler; ...

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

74. 实体组件系统 · LayaAir3.3 · 引擎文档 · LAYABOX [ 84%]

...wake不同的是即使节点未激活onAdded也会调用 onAdded(): void { console.log("Game onAdded"); } //重置组件参数到默认值,如果实现了这个函数,则组件会被重置并且自动回收到对象池,方便下次复用。如果没有重置,则不进行回收复用 onReset(...

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

75. Laya.Pool.getItemByClass 闪退 [ 84%]

...s 闪退 var fish:CFFish = Laya.Pool.getItemByClass(type,CFFish) as CFFish console.log(fish) fish.visible = true fish.init(type) 调用init方法时候闪退,错误信息是 "fish.init is not a function" "TypeError: fish.init is not a function at Function.CFSprite.reusableFishWithType (file:///Use...

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

76. 2.4 生命周期触发多次,连constructor都执行了两次 [ 84%]

...命周期触发多次,连constructor都执行了两次 onAwake():void { console.log("onAwake"); } onStart():void { console.log("onStart"); } onEnable():void { console.log("onEnable"); } onDisable():void { console.log("onDisable"); } 附件 : --> 2019-12-09 添加评论 免费帖 --> 分享 微博 ...

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

77. Laya.loader.create中的progress回调好像不准确? [ 84%]

...n/yueren.ls", Laya.Handler.create(this, function () { //complete func console.log("Scene loaded"); isLoaded = true; }), Laya.Handler.create(this, function (pro) { if (debug) console.log("Loading progresss : " + pro); }, null, false), Laya.Scene); Monica • 2018-03-21 11:01 ...

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

78. 排坑:Laya.HttpRequest()无效 [ 84%]

...码并打印到控制台。然而,什么也获取不到 下面是代码 console.log("开始测试"); var xhr = new Laya.HttpRequest(); xhr.http.timeout = 10000;//设置超时时间; xhr.once(Event.COMPLETE, this, completeHandler); xhr.once(Event.ERROR, this, errorHandler); xhr.on(Event.PROGRESS,...

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

79. [LayaAir 2.0] 如何获取碰撞点坐标? [ 84%]

...个参数: onTriggerEnter(other: any, self: any, contact: any): void { console.log(other); //被碰撞的对象 console.log(self); //自己 console.log(contact); //连接点对象, contact.getHitInfo(); //这里有碰撞点的信息 }   官方文档不全,或者说没法说的那么仔细,...

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

80. 微信小游戏iOS平台下的Laya.timer.delta在设置Laya.timer.scale=0后会异常暴增 [ 84%]

....timer.delta累计游戏玩了多长时间 下面是代码: onHide():void{ console.log("onhide|aaa|" + Laya.timer.delta); Laya.timer.scale = 0; console.log("Laya.timer.scale=" + Laya.timer.scale); } onShow():void{ console.log("onshow|bbb|111|" + Laya.timer.delta); Laya.timer.scale = 1; console.log("...

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