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

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

581. 通过laya设计模式制作的,要怎么给按钮绑定事件呢? [ 92%]

...的链接 提交 2 个回复 Laya_Aaron 赞同来自: on(Event.MOUSE_DOWN,this,onClick); 试一下吧  onclick 函数里再打印log 2017-12-13 0 10 分享 微博 QZONE 微信 Laya_Aaron 赞同来自: 这个进度条 var 为pro 另外一张图的类继承了之前页面发布生成的类,直接...

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

582. workerLoader问题 [ 92%]

...本:2.2.0beta1,ts_new 看代码 constructor(){ super();             this.worker = new Worker(WorkerLoader.workerPath); this.worker.onmessage = function(evt:any):void { //接收worker传过来的数据函数 (this as any as WorkerLoader).workerMessage(evt.data); } } 回调函数this指向有问...

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

583. 学习官方视频教程中飞机大战游戏出现的问题!! [ 92%]

...大战游戏出现的问题!! 在鼠标控制飞机移动时,写成this.hero.pos(Laya.stage.mouseX, Laya.stage.mouseY);是没有用的,可以看到hero容器的坐标变化了,但是机身显示还在原地并未移动, 但如果设置this.hero.aniBody.pos(Laya.stage.mouseX, Laya.stage.m...

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

584. 粒子-粒子演示2 [ 92%]

...r = "#232628"; Stat.show(); Laya.loader.load(partPath, Laya.Handler.create(this, this.onAssetsLoaded), null, Loader.JSON); } onAssetsLoaded(settings) { // 当load数组的时候,回调函数传入的参数不再是资源,可以通过以下方法获取资源 // let settings = Laya.loader.getRes(p...

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

585. 粒子-粒子演示3 [ 92%]

...r = "#232628"; Stat.show(); Laya.loader.load(partPath, Laya.Handler.create(this, this.onAssetsLoaded), null, Loader.JSON); } onAssetsLoaded(settings) { // 当load数组的时候,回调函数传入的参数不再是资源,可以通过以下方法获取资源 // let settings = Laya.loader.getRes(p...

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

586. List的selectHandler 点击同一个item只能触发一次回调 [ 92%]

...dz5566 • 2019-03-06 23:14 laya.ui.js改成这样即可,去掉判断if (this._selectedIndex !=value) __getset(0,__proto,'selectedIndex',function(){ return this._selectedIndex; },function(value){ //if (this._selectedIndex !=value){ this._selectedIndex=value; this.changeSelectStatus(); this.event(/...

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

587. MOUSE_UP事件 [ 92%]

MOUSE_UP事件 当我使用 for(var i=0;i<3;i++){ this["_role_"+i].on(Event.MOUSE_DOWN,this,this.clickDown) ; this["_role_"+i].on(Event.MOUSE_MOVE,this,this.clickMove); // this["_role_"+i].on(Event.MOUSE_UP,this,this,clickUp); }这样的方式添加监听时,MOUSE_UP不支持对象采用拼接...

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

588. Laya的Dialog上如果有按钮 我希望点击到按钮或者其他可以相应的控件 不会触发拖动效果 [ 92%]

...部分。 核心就是如下方法: public setCanDrag(canDrag:boolean) { this.m_CanDrag = canDrag; if(this.m_CanDrag) { this.on(Laya.Event.MOUSE_DOWN, this, this.onMouseDown); } else { this.off(Laya.Event.MOUSE_DOWN, this, this.onMouseDown); } }  onMouseDown(e: Laya.Event) { // console.log(e.curr...

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

589. [LayaAirIDE3]skel骨骼动画播放失败,编辑器预览没问题 [ 92%]

...re ... ot%3B, Laya.Loader.SPINE).then((templet: Laya.SpineTemplet) => { this.skeleton = new Laya.SpineSkeleton();     this.skeleton.templet = templet;     console.log("动画数量:", this.skeleton.getAnimNum());     for (let i = 0; i < this.skeleton.getAnimNum(); i++) {         co...

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

590. [分享]微信小游戏声音资源批量加载卡住,临时解决方案 [ 92%]

...iniSound类中,增加函数           __proto.resetPlay=function(){ this._sound.stop(); this._sound.volume = 1; this._sound.offPlay(); }          2 在MiniSound类的onDownLoadCallBack函数中,this._sound.onError(MiniSound.bindToThis(this.onError,this));          这一句的后...

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