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

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

41. Sprite中的width,height和size(width,height)感觉没作用啊 [ 54%]

...   sprite.graphics.drawTexture(texture,0,0,50,50);         sprite.autoSize = true; })); Laya.stage.addChild(sprite); 或者用Image: var image:laya.ui.Image = new laya.ui.Image("comp/bg.png"); image.size(50,50); Laya.stage.addChild(image); 2016-07-11 1 0 分享 微博 QZONE 微信 cuixueyi...

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

42. 新手!谁懂得把下面两个文件转成layaair可以运行的代码 [ 53%]

...ables;     import flash.text.TextField;     import flash.text.TextFieldAutoSize;     import flash.text.TextFormat;       import org.as3lib.logging.ILogger;     import org.as3lib.logging.Log;       public class Game extends Sprite     {         CONFIG::debug         {      ...

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

43. UI-RefreshList [ 52%]

...xt.fontSize = 35; tiptext.color = "#e5e5e5"; tiptext.pos(172, 20); tiptext.autoSize = true; var texArea = new TextArea(); image.addChild(texArea); texArea.hScrollBarSkin = ""; texArea.wordWrap = true; texArea.multiline = true; texArea.editable = true; texArea.text = "顶与底的列表尽头可拉...

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

44. 为什么laya的Button渲染逻辑顺序是先渲染,再获取素材切片? [ 49%]

...*i,width,height)); } } AutoBitmap.setCache(key,this._sources); } if (this._autoSize){ this._bitmap.width=this._width || width; this._bitmap.height=this._height || height; if (this._text){ this._text.width=this._bitmap.width; this._text.height=this._bitmap.height; } }else { this._text && (thi...

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

45. sprite做的按钮点击无反应? [ 48%]

...性能,慎用 lei159130 • 2017-08-24 11:12 @ohkei:可以设置Sprite的autoSize属性为true来自动获取,也可以使用getBounds获取父容器的矩形框。

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

46. laya.display.Sprite [ 43%]

...以通过getBounds函数获取;也可手动设置宽高;还可以设置autoSize=true,然后再获取宽高。Sprite的宽高一般用于进行碰撞检测和排版,并不影响显示图像大小,如果需要更改显示图像大小,请使用 scaleX , scaleY , scale。 Sprite 默认...

来源: laya_api 发布时间: 20170929

47. 下拉选项框组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 42%]

...lSize = 30; ComboBox.itemSize = 25 this.owner.addChild(ComboBox); ComboBox.autoSize = true; ComboBox.pos(200, 200); }); } } Copyright ©Layabox 2025 all right reserved,powered by LayaAir Engine更新时间: 2025-10-10 16:27:59 img{cursor:pointer}

来源: Laya3.0_文档 发布时间: 20251010

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

...pha=1; flower.pivotX=25; flower.pivotY=80; flower.zOrder = budai.y; flower.autoSize = true; flower.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)...

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

49. laya.map.TileAniSprite [ 38%]

...认值为1,表示不透明。更改alpha值会影响drawcall。Sprite autoSize : Boolean = false 指定是否自动计算宽高数据。默认值为 false 。 Sprite宽高默认为0,并且不会随着绘制内容的变化而变化,如果想根据绘制内容获取宽高,可以设置本属...

来源: laya_api 发布时间: 20170929

50. 如何启用摇一摇 [ 38%]

...ors.Accelerometer; import flash.text.TextField; import flash.text.TextFieldAutoSize; public class Shake_A_Shake extends Sprite { private var acc1:Accelerometer; private var oldAccX:Number; private var oldAccY:Number; private var oldAccZ:Number; private var sum:Number; private var txt:TextField; publ...

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