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

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

271. 子容器的事件问题 [ 76%]

...d(): void { //实例UI界面 var testUI: TestUI = new TestUI(); Laya.stage.addChild(testUI); let vhvt: ViewHeadViewTest = new ViewHeadViewTest(); //testUI.addChildAt(vhvt, 0); testUI.addChild(vhvt); vhvt.on(laya.events.Event.CLICK, this, (event: Laya.Event) => { console.log("为什么这里不进...

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

272. fitDOMElementInArea HTML元素位置不正确问题 [ 76%]

...位置不正确问题 在loader资源完成的回调里首次 Laya.stage.addChild(new 页面1);然后调用laya.utils.Utils.getGlobalPosAndScale(Laya.stage); 打印缩放值, 移动端很大几率值是1,ios基本每次都是 这会导致首屏页面里的html元素调用 Laya.Utils.fitDOMElemen...

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

273. 为什么会出现报错 ani not found:ufo1_down [ 76%]

...悲剧 this.bg = new BackGround(); // 把背景添加到舞台 Laya.stage.addChild(this.bg); // 加载图集资源 Laya.loader.load("res/atlas/war.json",Laya.Handler.create(this,onLoaded),null,Laya.Loader.ATLAS); })(); function onLoaded(){ // 创建一个主角 this.hero = new Role(); // 初始化...

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

274. 没有预加载的图片怎么获取width和height ? [ 76%]

...    older.loadImage("../laya/assets/comp/image.png");     Laya.stage.addChild(older);     console.log(older.scaleX,older.scaleY,older.rotation,older.x,older.y, older.width,older.height,older.getBounds().width,older.getBounds().height);      older.scale(2,2);     console.log(older.s...

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

275. 在加载包含Animation的prefab后,动画没有显示 [ 76%]

...J = Laya.Pool.getItemByCreateFun("gk2v1",gkpref.create,gkpref); this.Scene.addChild(OBJ); })); 附件 : --> ZMW.zip 2020-10-22 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2 个回复 王炸 赞同来自: 我尝试在加载...

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

276. 关于Matter的初始化问题 [ 75%]

...r.spriteContainer = spriteCon; render.graphicsContainer = graphicsCon; con.addChild(spriteCon); con.addChild(graphicsCon); graphics = graphicsCon.graphics; } 现在con这个是undefined的。请问这个在哪来赋值哦。看了半天没看懂 2018-06-13 添加评论 免费帖 --> 分享 微博 QZ...

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

277. hBox使用问题 [ 75%]

...pe.graphics.drawTexture(texture,0,0,stageWidth/4,stageWidth/4/bl); apesCtn.addChild(ape); } } 这种方法HBox布局不管用,是不是不能用graphics.drawTexture方法,如果用addChild方法加载Loader.getRes(picAy[i])这个数据,怎么写? 新手见笑了[/i] 2016-10-26 添加评论 ...

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

278. 把ani动画加载并播放动画,界面close导致界面卡死 [ 75%]

...相关的链接 提交 1 个回复 IM-许 赞同来自: 暂时已解决  AddChild上不要 AddChild到image上就可以了 2019-02-27 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 该问题目前已经被锁定, 无法添加新回复 发起人 IM-许 相关问题 Layabox ...

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

279. UI组件对齐方式奇奇怪怪 [ 75%]

...ew Box(); _parent.graphics.drawRect(0, 0, 500, 500, '#ff0000'); Laya.stage.addChild(_parent); var _child = new Box(); _child.graphics.drawRect(0, 0, 50, 50, '#336699'); _child.bottom = 0 _parent.addChild(_child); 按理说 我设置了额child的bottom为0 应该是 靠底部对齐才对啊 为什...

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

280. WXOpenDataViewer 微信开放数据域 是不是不能响应鼠标拖动事件呢? [ 75%]

...何吓吓:请问内嵌模式直接new出来的场景是直接用Laya.stage.addchild加到场景里? 内涵tv何吓吓 • 2019-03-07 09:28 @HoJanHoi:Laya.stage.addchild是加到stage上,场景和stage是不同的概念吧我觉得,因为我理解是场景也是在stage上展示的 HoJanHoi •...

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