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

大约有 1,013 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0047 秒)

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

...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

252. rigidBody.applyForce 物体不会移动 [ 71%]

....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

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

...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

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

....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

255. 关于button的click监听 [ 71%]

...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

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

...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

257. http 请求 once 的 回调参数,如何传递和接收? [ 70%]

..., "post","json",null);   回调方法: success:function (e,args) {     console.log(e); //此行可以得到响应内容     console.log(args);  //此行无法获取自定义参数? } 请问如何获取/传递 自定义参数。 2018-03-04 添加评论 免费帖 --> 分享 微博 QZONE ...

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

258. Tab组件如何通过js控制选中 [ 70%]

...: 2 人 xdkaka • 2017-12-14 17:38 我就是这么做的,不可以啊,console.log可以出来当前的选项,说明继承没有问题,但是无法更改 class Tab extends TabUI{ constructor() { super() this.zOrder = 1 console.log(this._tab._selectedIndex) //返回1,正常 this._tab._selec...

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

259. 龙骨动画的监听回调,有时能回调,有时不能回调 [ 70%]

..._ddz/animation/ddz_figures_landlord.sk"); }    private onError(): void { console.log("error"); }  private parseComplete(): void { console.error("地主加载完成"); this.isFinish = true; }  public getArmature():Laya.Skeleton{ if(!this.isFinish){ return null; } let armature = null; if(this.mArm...

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

260. 请问如何监听html的button元件ontouchstart,ontouchend等事件 [ 70%]

...ment.createElement('button'); this.btn_CloseWebiFrame.onclick = () => { console.log("onclick"); };  oncontextmenu也没有问题。this.img_closeWebiFrame.oncontextmenu = () => { console.log("aaa4"); this.img_closeWebiFrame.src = "SlotGameTemplate/phone_public_setting_source/phone_btn_setting...

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