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

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

171. Sprite-切换纹理 [ 62%]

....width / 2, Laya.stage.height / 2); this.switchTexture(); this.ape.on(Laya.Event.CLICK, this, this.switchTexture); } switchTexture() { let monkey = (this.flag = !this.flag) ? monkey1Res : monkey2Res; this.ape.graphics.clear(); this.ape.graphics.drawTexture(monkey, 0, 0); this.ape.size(monkey.width, ...

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

172. 父元素,子元素,兄弟元素 [ 62%]

...问题,其实很简单,点击方法中,会带一个参数:e:Laya.Event,这个能数有阻止点击事件冒泡 点击事件: this.btnHome.on(Laya.Event.CLICK, this, this.homeClick);   private homeClick(e) { //防止点击事件穿透 e.stopPropagation(); } 2018-10-12 0 0 分享 微博...

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

173. drawToTexture截大图有问题,会丢失 [ 62%]

...e;         Laya.stage.addChild(this.nsp);         this.nsp.on(Laya.Event.CLICK,this,this.drawImg,null)     }     drawImg(e:Event=null):void{         var copySpr:Laya.Sprite=new Laya.Sprite();         copySpr.texture=this.nsp.drawToTexture(1600,1600,0,0) as Laya.Texture;       ...

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

174. 播放视频只有声音没有图像 [ 62%]

...audio/梅林茂 - 静かな古都.mp3", 0); this.login_game_button.on(Laya.Event.CLICK, this,this.onStartButtonClick); } onStartButtonClick(){ // 创建Video元素 let videoElement = Laya.Browser.createElement("video"); Laya.Browser.document.body.appendChild(videoElement); videoElement.style.zInddex...

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

175. 分享:Panel下动态修改子容器宽高并刷新显示! [ 62%]

...宽高并刷新显示! package { import laya.display.Sprite; import laya.events.Event; import laya.ui.Button; import laya.ui.Panel; import laya.utils.Browser; import laya.utils.Handler; public class LayaUISample { public function LayaUISample() { // 不支持WebGL时自动切换至Canvas Laya.init...

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

176. worldroot [ 61%]

...hildAt(root, 0);   Laya.Physics.I.worldRoot = root;   Laya.stage.on(Laya.Event.CLICK, this, () => { Laya.Physics.I.worldRoot.x -= 50; });   设置worldRoot = 一个新的sprite后, 移动world root ,物理世界不会跟着一起移动 2018-11-26 添加评论 免费帖 --> 分享 微博 QZ...

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

177. [LayaAir3]插件开发中,我需要选择文件夹,如何可视化选择文件夹 [ 61%]

... name: "", inspector: "Buttons", options: { buttons: [{ caption: "生成", event: "click_start_gen" }] } } ] } ]); Editor.extensionManager.createSettings("SplitAtlasSetting", "project"); } } 2025-07-23 0 0 分享 微博 QZONE 微信 LayaAir小牛 赞同来自: 方法为Editor.showOpenDialog 2025-07-...

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

178. ui camera相关 [ 61%]

...论坛并没有明确的引入方案,小白就更不懂了 有没有Laya.Event.CLICK的相关说明文档 Laya.URL.basePath 相关 .bat脚本能调用layaIDE的相关功能吗? as3.0下3D引擎中通过滑动控制camera的问题 问题状态 最新活动: 2018-03-28 20:27 浏览: 796 关注: 2 ...

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

179. Dialog [ 61%]

...ction Controller() {     Controller.super(this);      this.btn.on(Event.CLICK,this,function(){           this.destroy();     })  } Laya.class(Controller, "Controller", stUI); 2018-08-31 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: ...

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

180. 分享:Dragonbones/Spine的换肤操作 [ 61%]

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