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

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

141. app 上使用 soundchannel.pause() 暂停音效音乐,用 resume() 播放都会从头开始播放 [ 64%]

...       let _pause:boolean = false;         btn1.on(Laya.Event.CLICK,this,()=>{             if(!_pause)return;             sound.pause();             _pause = false         })         btn2.on(Laya.Event.CLICK,this,()=>{  ...

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

142. dialog.removeSelf is not a function [ 63%]

...laneGameInfoDialogUI;。。。(关闭按钮)this.ui.ibtn_close.on(Laya.Event.CLICK,this,this.ui.close);。。。(点击之后)Uncaught TypeError: dialog.removeSelf is not a function....求助大神谢谢啦~~~ 2017-04-18 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相...

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

143. 切换位图,点击图片距离容器的区域也会触发点击事件 [ 63%]

...例 img.width = 300; //宽高 img.height = 200; switchImg(); img.on(Laya.Event.CLICK, this, switchImg) //点击事件 Laya.stage.addChild(img); function switchImg() { img.graphics.clear(); //清除绘制 var imgUrl = (this.flag = !this.flag) ? this.img1 : this.img2; img.loadImage(imgUrl, 100, 100) }...

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

144. LoginView.super(this);这样调用的父类的构造函数的方法,不能用吗 [ 63%]

...w = function () {     LoginView.super(this);     this.btnReg.on(Laya.Event.CLICK, null, function () {         console.log("on btReg event")     }); } 目前编辑的代码辅助,好像还是无法获得父类的成员变量比如 btnReg。这是视频提到的一个ide的功能bug ...

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

145. 微信飞机大战报错 [ 63%]

...\node_modules\vscode-debugadapter\lib\protocol.js:24:60)     at emitOne (events.js:96:13)     at Socket.emit (events.js:188:7)     at readableAddChunk (_stream_readable.js:[...]   GameInfo.js代码: var GameInfo = (function(_super){     function GameInfo(){         GameInfo.super(this);...

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

146. 老师,请问一下如何在js代码中,动态的创建一个按钮(或者图片、lable)并添加到一个box中? [ 63%]

...utton("comp/btn_start.png","测试按钮"); bt.on(Laya.Event.CLICK, this, this.click); Laya.stage.addChild(bt); function click() { console.log("??????????"); } 点击之后没有翻译,按钮也没有点击的动画 cuixueying • 2017-04-24 11:07 我们测试是OK的...

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

147. 分享:Dragonbones/Spine的换肤操作 [ 63%]

...Templet; import laya.display.Sprite; import laya.display.Text; import laya.events.Event; import laya.utils.Browser; import laya.utils.Stat; import laya.webgl.WebGL; public class LayaAirDemo { private var templete:Templet;//动画模板类 private var skeleton:Skeleton;//骨骼动画类 private var c...

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

148. 对象监听另外一个脚本的执行方法不被执行 [ 63%]

...钮的监听 //下拉菜单信息按钮监听 this.AllTitleButton.on(Laya.Event.MOUSE_DOWN, this, ButtonClickManager.clickinstance.AllTitleButtonClick);   而在另外的一个单例脚本中单例分离了执行方法 因为按钮监听太多 需要分离 监听和执行 /** * 基础信息按钮...

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

149. 类似于list下的按钮监听 !如何去做。 [ 62%]

...2018-06-28 23:26 给 Sprite 中 按键设置name ,然后通过 Sprite.on(Event.CLICK,this,yfqian_GameUi); public function yfqian_GameUi(e:Event):void{ trace("Sprite:",e.target.name) }

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

150. 区块地图-等角地图 [ 62%]

...WALL; Laya.stage.bgColor = "#232628"; this.createMap(); Laya.stage.on(Laya.Event.CLICK, this, this.onStageClick); } createMap() { const TiledMap = Laya.TiledMap, Rectangle = Laya.Rectangle, Point = Laya.Point; this.tiledMap = new TiledMap(); this.tiledMap.createMap("res/tiledMap/isometric_grass_and_...

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