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

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

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

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

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

212. 两个小问题 [ 55%]

...、一个面板中含有几个按钮,分别为按钮添加 this.myBtn.on(Event.CLICK) 事件,点击某按钮后有时还会发送事件 this.event(...),在关闭面板时设置 this.removeSelf() ,下次生成同类型的对象面板可正常打开;若在关闭时设成 this.destroy() 或 t...

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

213. 画了一个封闭的曲线,获取鼠标点击处的像素,为何坐标对不上导致拿不到正确位置的Texture? [ 55%]

...ckage { import laya.display.Sprite; import laya.display.Stage; import laya.events.Event; import laya.resource.HTMLCanvas; import laya.resource.Texture; import rain.core.StageReferance; public class Main { private var _view:Sprite; public function Main() { Config.isAntialias = true;//抗锯齿 //初...

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

214. 针对2.0.0 beta5 setLoadingPage 做增强 [ 55%]

...ndler otherHandler().then(res => { // 默认进度加1% this._loadScene.event("progress", .01) if (res) param = .concat((param || ), [res]) Laya.Scene.open(url, closeOther, param, complete, progress) }) } /** * 清除loading page */ clearLoadingPage() { this._loadScene = null Laya.Scene.setLoadin...

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

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

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

216. 动画-旧版骨骼动画 [ 55%]

...("../../res/threeDimen/skinModel/Zombie/old/Zombie.lh")); zombie.once(Laya.Event.HIERARCHY_LOADED, this, function () { zombie.transform.rotation = new Laya.Quaternion(-0.7071068, 0, 0, -0.7071068); zombie.transform.position = new Laya.Vector3(0.3, 0, 0); addSkinComponent(zombie); loadUI(); }); var s...

来源: Laya_示例 发布时间: 20251130

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

218. 区块地图-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

219. 微信小游戏分包实战(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

220. 关闭指定定时器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