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

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

291. 自己创建的box作为tab,为啥没有点击事件啊? [ 70%]

...alse);//设置 tab 的选择项发生改变时执行的处理器。     console.log("A123");     function onSelect(index)     {         console.log("当前选择的标签页索引: index= ", index);     } } 附件 : --> Del5.rar 2016-07-22 添加评论 免费帖 --> 分享 微博 QZONE ...

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

292. TypeScript在LayaAir 1.X和2.X中对待module和namespace的异同,求2.x使用自定义namespace的方法(module已经找到方法) [ 70%]

...Import的功能实现的) import BM from './b'; window.onload = ()=>{ console.log(AM.AC.myname); console.log(BM.BC.myname); console.log(Laya.Browser.clientWidth); } 实际测试能完美运行。 我就一个小疑问,如果我想用namepsace而非module声明AM, BM,我就是坐出痔疮也...

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

293. 分享个资源加载的方法,类似白鹭的加载方式 [ 70%]

...组名称 */ public static loadGroup(groupName: string){ if(!groupName){ console.error("资源组名称不能为空"); RES.getInstance().event(RES.ONLOADGROUPERROR,"资源组名称不能为空"); return; } var group; for(var i in RES.groups){ var name = RES.groups[i].name; if(name == groupName){ gro...

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

294. rigidBody.applyForce 物体不会移动 [ 70%]

....MeshSprite3D = building.getChildByName( "fence15" ) as Laya.MeshSprite3D; console.log("-----"); console.log(building); console.log("-----"); console.log(moveArea); } private playRun(): void { this.animator.play("Running"); this.animator.speed = 1.0; } private playIdle(): void { this.animator.play("...

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

295. 请问Laya如果获取Laya.Event.CLICK时间的点击坐标? [ 70%]

...ect.on( Laya.Event.CLICK, this, changeVxVy ); } function changeVxVy( e ){ console.log( e.nativeEvent.offsetX ); console.log( e.nativeEvent.offsetY ); }   我设置了一个矩形,并给这个矩形增加了一个点击事件。 我发现e.nativeEvent.offsetX和e.nativeEvent.offsetY返回相对...

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

296. 微信小游戏,实现监听前后台切换 [ 70%]

....onShow(this.resumeGame) wxHelper.onHide(this.pauseGame) } resumeGame () { console.log('resumeGame') } pauseGame () { console.log('pauseGame') } onDestroy () { wxHelper.offHide() wxHelper.offShow() } }   2018-11-01 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已...

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

297. 关于button的click监听 [ 70%]

...s(200,200); Laya.stage.addChild(btn); btn.on(Laya.Event.CLICK,this,()=>{console.log("click button");});   请问 这样监听不到button的点击事件吗?如果我创建一个ui.view  a  a.on 也监听不到吗 2017-11-28 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到...

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

298. 小图集内存较大,且不能清理掉 [ 70%]

...aphics.clear(); _s.destroy(true); _s.removeSelf(); _s=null;      console.log(Laya.loader.getRes(_url)); Loader.clearRes(_url,true); console.log(Laya.loader.getRes(_url)); } 2017-02-22 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关...

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

299. Laya.Handler.create 加载图片回调参数问题 [ 70%]

...mg/popular.png", 0, 0, 0, 0, Laya.Handler.create(this, function (a1, a2) { console.log(a1, a2); }), [100]);   为什么不能把Laya.Hander.create后面带的这个参数传到Function里面?       附件 : --> 2018-06-21 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关...

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

300. 打APK后加载unity导出资源出错 [ 70%]

...apName+"1.lh";         if(this.PRINT_LOG){             console.log("准备读取区域"+curIndex+" 的 路径: "+path+"地图");         }         Sprite3D.load(path,Handler.create(null,function(sp){             if(_$this.PRINT_LOG){          ...

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