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

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

181. Laya事件不能添加给多边形吗? [ 59%]

...ght-100, "#ffffff" ); Laya.stage.addChild( clickRect ); clickRect.on( Laya.Event.CLICK, this, function(){ console.log( 'adf' ) } );   我创建一个多边形,然后添加一个点击事件就没反应。但是如果添加一个图片,点击就有反应,请问是我的写法有问题吗? 20...

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

182. layaide建的ui里面的按钮怎么获取到呢?事件怎么添加呢? [ 58%]

...d(ListDemoView); var btn = ListDemoView.getChildByName("startbtn"); btn.on(Event.CLICK, this, clickHandler); 这样不行 2018-05-24 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 181*****859 赞同来自: 已解...

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

183. Sprite-新手引导 [ 58%]

...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_示例 发布时间: 20240930

184. 使用loadImage加载一个图片后的点击事件 [ 58%]

...300, 60, 60, Laya.Handler.create(this, function(){         ape.on(Laya.Event.CLICK, this, function(){         console.log(111)     }) }));使用这段代码加载了一个60x60大小的图片(下图中骑马的那个人物),并且在加载完成的回调给这个图片添加点击事...

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

185. Sprite3D的Layer(JavaScript-3D基础(JS)-LayaAir3D之精灵) [ 58%]

...4; ...... //切换图层按钮事件监听 this.changeActionButton.on(Laya.Event.CLICK, this, function():void { this.camera.removeAllLayers(); this.layerIndex ++; this.camera.addLayer(this.layerIndex%4 +1); this.camera.addLayer(5); }); ``` ![](img/1.gif)(图1)

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

186. Sprite3D的Layer(TypeScript-3D基础(TS)-LayaAir3D之精灵) [ 58%]

...4; ...... //切换图层按钮事件监听 this.changeActionButton.on(Laya.Event.CLICK, this, function():void { this.camera.removeAllLayers(); this.layerIndex ++; this.camera.addLayer(this.layerIndex%4 +1); this.camera.addLayer(5); }); ``` ![](img/1.gif)(图1)

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

187. 请问object层中添加的sprite怎么添加点击事件 [ 58%]

...wer.height = 100; flower.width = 100; flower.size(100,100); flower.on(Laya.Event.CLICK,this,function() {    alert("My Name is Bear"); }); mallLayer.addChild(flower); mallLayer._showGridList.push(flower); 附件 : --> hxwlworld.zip 2018-07-22 添加评论 免费帖 --> 分享 微博 QZONE 微信 ...

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

188. Sprite3D的Layer(ActionScript-3D基础(AS3)-LayaAir3D之精灵) [ 58%]

...3.layer = 4; ...... //切换图层按钮事件监听 changeActionButton.on(Event.CLICK, this, function():void { camera.removeAllLayers(); layerIndex ++; camera.addLayer(layerIndex%4 +1); camera.addLayer(5); }); ``` ![](img/1.gif)(图1)

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

189. 骨骼动画如何响应点击事件? [ 58%]

...不了点击事件,求助   //响应点击事件 humanSkeleton.on(Laya.Event.CLICK,this,onclickHuman);   function onclickHuman(){ console.log("onclickHuman"); } https://www.cnblogs.com/Jackie-Snow/p/8487607.html 网上的这个方式试了,没用,按照网上说是没有设置width与height ...

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

190. laya如何用audio播放音频? [ 58%]

...TMLAudioElement; constructor(){     super();     this.btn_play.on(Laya.Event.CLICK, this, this.onPlay);     this.elentAutio = <HTMLAudioElement>document.createElement('audio');     this.elentAutio.src="res/10.mp3"; } onPlay():void{     this.elentAutio.play(); }   由于要播放一...

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