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

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

261. Sprite-新手引导 [ 55%]

...Container.loadImage("res/guide/crazy_snowball.png"); gameContainer.on(Laya.Event.CLICK, this, this.nextStep); // 引导所在容器 guideContainer = new Sprite(); Laya.stage.addChild(guideContainer); guideContainer.cacheAs = "bitmap"; // 绘制遮罩区,含透明度,可见游戏背景 maskArea =...

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

262. Laya.URL.basePath 相关 [ 55%]

...ScrollBar的scrollSize量没有效果 及 文本不可编辑 有没有Laya.Event.CLICK的相关说明文档 请问Laya的坐标系是什么样子的 2D的 怎么没有看到有相关的介绍 问题状态 最新活动: 2018-04-10 21:21 浏览: 2160 关注: 2 人 illegaldriver • 2018-04-10 21:27 ...

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

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

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

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

264. sprite 添加点击事件没反应,对sprite设置了size也没用 [ 55%]

... ; Laya.stage.addChild(this.btn) ; this.btn.size(25,25) ; this.btn.on(Laya.Event.CLICK, this, music.music_voice_toggle); 代码是这样的 , 图片上传不了,代码直接贴上来 2017-08-03 0 0 分享 微博 QZONE 微信 cuixueying 赞同来自: 最好上传个能重现问题的Demo,只看...

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

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

...ne的缘故,点击空白处返回的对象是scene) Laya.stage.on(Laya.Event.CLICK,this,function(e) { if(e.target.name == "scene的名字") { this.isClick = true; //如果点击的是屏幕的空白处,那么让 isClick 为真 } else { this.isClick = false; //如果点击的不是空白处,...

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

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

...Effect = 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(...

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

267. 区块地图-PerspectiveWall [ 54%]

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

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

268. 关闭指定定时器timer [ 54%]

...器还在继续调用回调,并没有报错。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 roundTurnCha...

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

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

...钮btnA的点击事件,触发后处理 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...

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

270. Sprite设置mask属性为什么显示是透明的?怎样才能显示正常? [ 54%]

...awRect(0, 0, Laya.stage.width, Laya.stage.height, "#000000"); mask.on(Laya.Event.CLICK,this,chick);   function chick(){ mask.destroy(); gameContainer.destroy(); }   gameContainer.mask=mask; Laya.stage.addChild(gameContainer);  })();  })(); 附件 : --> 2020-06-03 添加评论 免费帖 --> 分...

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