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

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

471. 局部坐标转全局坐标结果与预期相差甚远 [ 63%]

...远 在某个地方使用var pos:Point = img.localToGlobal(new Point(img.width/2, img.height/2));转换坐标 结果是完全正确的。但最近又有地方需要用到 于是写了trace(soil_1.localToGlobal(new Point(soil_1.width/2, soil_1.height/2)));结果与预期相差很远。结果与预期...

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

472. 【简单跑酷--JS版】---Lv.3 添加地板 [ 63%]

...的速度和移动比背景快一点 this.x -= 5 * 1.2; if((this.x + this.width) < 0){ //判断整个floor是否不在屏幕里面了 如果不在了 移除当前floor Laya.timer.clear(this, this.onLoop); this.visible = false; this.removeSelf(); } } })(); 地板有了 我们打开MapFloor.js 来...

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

473. UI-List [ 63%]

...temRender = Item; list.repeatX = 1; list.repeatY = 4; list.x = (Laya.stage.width - WID) / 2; list.y = (Laya.stage.height - HEI * list.repeatY) / 2; // 使用但隐藏滚动条 list.vScrollBarSkin = ""; list.selectEnable = true; list.selectHandler = new Handler(this, this.onSelect); list.renderHandle...

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

474. UI-List [ 63%]

...temRender = Item; list.repeatX = 1; list.repeatY = 4; list.x = (Laya.stage.width - WID) / 2; list.y = (Laya.stage.height - HEI * list.repeatY) / 2; // 使用但隐藏滚动条 list.vScrollBarSkin = ""; list.selectEnable = true; list.selectHandler = new Handler(this, onSelect); list.renderHandler = n...

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

475. laya2.0 截图功能分享,直接截取屏幕上所有对象 [ 63%]

...tatic tempTexture: Laya.Texture; /**截图 */ public static drawScreenshot(width, height, x, y) { if (!SwitchHelper.screenDraw) { return null; }  if (!this.tempTexture2D) { this.tempTexture2D = new Laya.Texture2D(system.width, system.height); } if (!this.tempTexture) { this.tempTexture = new Laya.T...

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

476. textInput的单行输入&多行输入(ActionScript-LayaAir基础篇(AS3)-文本) [ 63%]

...性 y 的值,用于控制 textInput 对象的显示位置。 textInput.width = 300;//设置 textInput 的宽度。 textInput.height = 200;//设置 textInput 的高度。 textInput.bgColor = "#c30c30"; Laya.stage.addChild(textInput);//将 textInput 添加到显示列表。 } private function Text_I...

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

477. 在 tiledmap 插入一个精灵在上面 [ 63%]

...this.tiledMap.createMap("desert.json", new Laya.Rectangle(0, 0, Laya.stage.width, Laya.stage.height),   Laya.Handler.create(this,this.loadedMap)); }   loadedMap(){   this.sp=new Laya.Sprite();   this.sp.graphics.drawRect(0,0,100,100,"#FF0000");   var mapLayer = this.tiledMap.getLayerByIndex(1);...

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

478. 【getter属性被赋值】对clientWidth进行赋值导致报错 [ 63%]

【getter属性被赋值】对clientWidth进行赋值导致报错 Laya.Stage.setScreenSize()方法中,代码段: canvasStyle.width=canvasWidth; (左图引擎版本1.8.8,右图引擎版本1.8.14)   该语句会对clientWidth属性进行赋值,但在某些浏览器内核里,由...

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

479. 微信小游戏开放数据域按钮点击位置偏移 [ 63%]

...etOpenDataContext() var sharedCanvas = openDataContext.canvas sharedCanvas.width = layout.width; sharedCanvas.height = layout.height; //先清空绘制 layout.graphics.clear(false); //设置大小 var canvas = new Laya.Texture(sharedCanvas); canvas.bitmap.alwaysChange = true;//小游戏使用,非...

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

480. 屏幕适配后,sprite位置改变点击无法触发问题 [ 63%]

...高度定位的,绿色区域初始的区域大小,当我设置FIX_WIDTH的适配模式,当舞台大小发生改变后,超出绿色区域的部分,无法获取到点击事件 2017-11-15 0 0 分享 微博 QZONE 微信 什么被折叠? 0 个回复被折叠 该问题目前已经被锁定...

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