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

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

241. 微信小游戏分包实战(JavaScript-小游戏适配文档-微信小游戏) [ 56%]

... //监听按钮btnA的点击事件,触发后处理 UI.btnA.on(Laya.Event.CLICK, this, showB); } ``` 代码分出后,我们不要忘了在主包内调用微信小游戏官方提供的分包加载与回调通知方法。在示例项目中,我们直接在图集加载的回调里,加载分包。...

来源: Laya2.0_文档 发布时间: 20210715

242. Button和下面的3D物体重叠,点击button,3D物体会同时响应自己的鼠标脚本 [ 56%]

...链接 提交 1 个回复 From Nowhere 赞同来自: 自己解决吧let isClick; //前提:把所有可能与3D物体重叠的UI元素的 mouseEnable 设置为 true ,接收鼠标点击 onAwake() { this.isClick = false; //对舞台stage添加点击事件(这里由于有scene的缘故,点击空...

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

243. 这样一个ui怎么做 [ 56%]

...动的你意思~~~ Supermang42 • 2018-08-23 10:16 Botton.on(Event.CLICK); Loop(): void { x++; } 類似這樣。 owen7song • 2018-08-20 11:05 list可以手动滑动 需求是点箭头滑动 不能手动滑动~~ lilynumber1 • 2018-08-20 12:09 @owen7song:list只要你不设置hScrollBar...

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

244. 关于mouseThough=true的问题 [ 55%]

...ed():void{ var img:Image = new Image("fish_6.png"); img.on(Event.CLICK,this,onClick); img.mouseThrough = true; Laya.stage.addChild(img); } 代码就这么简单,图片我传到附件里面 shiyang • 2018-03-14 15:55 private function onClick(e:Event):void{ trace("xxxxxxx"); }

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

245. 使用webgl之后toDataUrl返回黑色的图像 [ 55%]

...t,WebGL); Stat.show(); Laya.stage.bgColor = "#ffcccc"; Laya.stage.on(Event.CLICK,this,onClick); sp= new Sprite(); sp.name='base'; sp.loadImage("logo.png"); Laya.stage.addChild(sp); } private function onClick():void { var htmlsss:String=(Laya.stage.getChildAt(0) as Sprite).drawToCanvas(100,100,0,0).g...

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

246. 微信小游戏分包实战(TypeScript-小游戏适配文档-微信小游戏) [ 55%]

...nA的点击事件,触发后处理 this.GameMain.newUI.btnA.on(Laya.Event.CLICK, this, this.showB); } //显示B页 private showB():void { this.GameMain.showUI(this.ui.bUI,this.GameMain.newUI) //监听按钮btnB的点击事件,触发后处理 this.GameMain.newUI.btnB.on(Laya.Event.CLICK, this, thi...

来源: Laya2.0_文档 发布时间: 20210715

247. 用IDE编辑器编辑好label,想弄点击文字变色功能,发现有问题 [ 55%]

...不知道是什么问题。以下是测试的简单代码: this.a6.on("click",this,onB);function onB(e) { etg = e.target; etg.color = "#ff0000"; } 2016-06-06 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 Monica...

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

248. popup设置了关闭效果后,窗口关闭但遮罩层没有关掉,请问如何处理 [ 55%]

... = Laya.Handler.create(this, this.hideEffect); this.btnClose.on(Laya.Event.CLICK, this, this.closeDialog); } //关闭 closeDialog(): void { this.close(); } //关闭效果 hideEffect(): void { Laya.Tween.to(this,{y:Laya.stage.height,alpha:0},200,Laya.Ease.linearIn); } //显示效果 showEffect(): voi...

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

249. 关闭指定定时器timer [ 55%]

...在继续调用回调,并没有报错。this.StartToRound.on(Laya.Event.CLICK,null,function(){ Laya.timer.loop(10,this,round);//10ms 一秒100次 }); //转动逻辑 function round(){ tlate.rotation+=roundTurnChange(1); console.log(tlate.rotation); } //转动变量变化 function roundTurnChange(ty...

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

250. 区块地图-PerspectiveWall [ 55%]

...Laya.stage.bgColor = "#232628"; this.createMap(); Laya.stage.on(Laya.Event.CLICK, this, this.onStageClick); } createMap() { const TiledMap = Laya.TiledMap, Rectangle = Laya.Rectangle; this.tiledMap = new TiledMap(); this.tiledMap.createMap("res/tiledMap/perspective_walls.json", new Rectangle(0, 0, L...

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