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

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

551. html固定宽高,设置垂直居中没有效果。只有水平居中才生效。看了下源码,感觉在updatePos函数里的算法不对 [ 92%]

...话只水平居中没有垂直居中。 调试的时候,在Layout.layout(this),跳进去 在Layout._multiLineLayout(element)里面的updatePos(0,tWidth,i,tY,align,valign,lineHeight)函数里对元素根据对齐方式重新设置坐标。这里面感觉对垂直居中的y坐标的计算方式...

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

552. UI-Dialog [ 92%]

...L; Laya.stage.bgColor = "#232628"; Laya.loader.load(assets, Handler.create(this, this.onSkinLoadComplete)); } onSkinLoadComplete() { const Dialog = Laya.Dialog, Image = Laya.Image, Button = Laya.Button; let dialog = new Dialog(); let bg = new Image(assets[0]); dialog.addChild(bg); let button = new B...

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

553. 导航标签组组件 · LayaAir3.0文档 · LAYABOX [ 92%]

...和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.tab.pos(200, 200); this.tab.labelBold = true; this.tab.labelSize = 20; this.tab.labelStrokeColor = "#000000"; this.tab.labels = "Tab 1,Tab 2,Tab 3"; this.tab.labelColors = "#32556b,#8FB299,#ff0000"; this.tab.selectedIndex ...

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

554. 分享:DrawToCanvas内存释放问题! [ 92%]

...命令按钮 var btnDraw:Sprite=CreateBtn(100,400); btnDraw.on(Event.CLICK,this,onClickBtnDraw); } //创建按钮 private function CreateBtn(xx:int,yy:int):Sprite { var btn:Sprite=new Sprite(); btn.graphics.drawRect(0,0,200,50,"#FF0000"); btn.pos(100,400); var text:Text=new Text(); text.text="Draw";...

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

555. Node.prototype._activeHierarchy存在的bug或者说是onEnable和onAwake的坑 [ 92%]

... __proto._activeHierarchy=function(activeChangeScripts){         this._setBit(/*laya.Const.ACTIVE_INHIERARCHY*/0x02,true);         if (this._components){             for (var i=0,n=this._components.length;i < n;i++){                 var comp=this._comp...

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

556. 3D场景脚本继承问题 (LayaAir 2.0.0) [ 92%]

...为Laya.Scene3D ,不能得到继承类BattleScene的实例 代码如下   this.resArray= [ { url : "LayaScene_CompleteMainScene_test/Conventional/CompleteMainScene_test.ls", clas:BattleScene} ];  //预加载 Laya.loader.create ( this.resArray, Laya.Handler.create(this,this.onPreLoadComplete), Laya...

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

557. 创建动画时画布的width和height与 实例化后的ani.size(width, height) 有什么区别 [ 92%]

...40x240的动画,代码如下_proto_.onAnimation_BirdSing = function () { this.aniBirdSing = new Laya.Animation(); this.aniBirdSing.loadAtlas("res/atlas/birdsing.json"); this.aniBirdSing.interval = 35; // 设置播放间隔(单位:毫秒) this.aniBirdSing.index = 0; // 当前播放索引 this...

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

558. 关于3d项目中component的问题 [ 92%]

...nslate = new Laya.Vector3(0, 0, 0); function CmpScript() { CmpScript.super(this); this.x = 0; } Laya.class(CmpScript, "CmpScript", Laya.Script) CmpScript.prototype._initialize = function (owner) { var _this = this; CmpScript.__super.prototype._initialize.call(this, owner); } CmpScript.prototype._upd...

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

559. Laya.loader加载BUG [ 92%]

...图片的时候,源码里这一步会的url为“”的时候,会执行this.onLoaded(null)这一步_ _proto.load=function(url,type,cache,group,ignoreCache,useWorkerLoader){         (cache===void 0)&& (cache=true);         (ignoreCache===void 0)&& (ignoreCache=fals...

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

560. LoginView.super(this);这样调用的父类的构造函数的方法,不能用吗 [ 92%]

LoginView.super(this);这样调用的父类的构造函数的方法,不能用吗 LoginView.super(this);这是在教学视频里用的方法,好像不能用了。 这些layaair中特别的语法规则在哪里统一可以找到 var LoginView = function () {     LoginView.super(this);     t...

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