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

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

1121. Sprite-轴心点 [ 76%]

...Laya.stage.bgColor = "#232628"; this.createApes(); } private createApes(): void { var gap: number = 300; this.sp1 = new Sprite(); this.sp1.loadImage("res/apes/monkey2.png", 0, 0); this.sp1.pos((Laya.stage.width - gap) / 2, Laya.stage.height / 2); //设置轴心点为中心 this.sp1.pivot(55, 72); La...

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

1122. 垂直布局容器组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 76%]

...有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.vbox.pos(100, 100); this.vbox.bgColor = "#ffffff"; this.vbox.space = 30; this.vbox.align = "center"; } } 二、通过代码创建VBox 有时,需要用代码管理UI,创建UI_VBox类用于创建VBox组件。由...

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

1123. Laya.loader加载BUG [ 76%]

...rl,type,cache,group,ignoreCache,useWorkerLoader){         (cache===void 0)&& (cache=true);         (ignoreCache===void 0)&& (ignoreCache=false);         (useWorkerLoader===void 0)&& (useWorkerLoader=false);         if (!url){          ...

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

1124. Sprite-遮罩-放大镜 [ 76%]

...("../../res/bg2.png", Handler.create(this, this.setup)); } private setup():void { var bg:Sprite = new Sprite(); bg.loadImage("../../res/bg2.png"); Laya.stage.addChild(bg); this.bg2 = new Sprite(); this.bg2.loadImage("../../res/bg2.png"); Laya.stage.addChild(this.bg2); this.bg2.scale(3, 3); //创建m...

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

1125. Swift中接入Native,执行完drawInRect后不执行update了! 附重现Demo! [ 76%]

...t后不执行update了! 附重现Demo! 在Swift中接入,调用到- (void)glkView:(GLKView *)view drawInRect:(CGRect)rect之后就不执行update 了,看你们的Demo是会继续执行update 方法的   //------------------------------------------------------------------------------   - (v...

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

1126. laya.d3.terrain.TerrainRes [ 76%]

...nRes[static] 异步回调 TerrainRes  load(url:String, complete:Handler):void[static] 加载地形模板,注意:不缓存。 TerrainRes  onLoadTerrainComplete(heightData:TerrainHeightData):voidTerrainRes  parseData(data:*):BooleanTerrainResProperty Detail_alphaMapspropertypublic var _alphaMaps...

来源: Laya2.0_api 发布时间: 20190513

1127. 水平布局容器组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 76%]

...有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.hbox.pos(100, 100); this.hbox.bgColor = "#ffffff"; this.hbox.space = 100; this.hbox.align = "middle"; } } 二、通过代码创建HBox组件 有时,需要用代码管理UI,创建UI_HBox类用于创建HBox组...

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

1128. 请问如何释放atlas和他的png资源 [ 76%]

...! 请问这个有什么规律吗 坐等! private function clickFun():void { url = "res/CH/atlas/MORNUI_Z_Gongneng.atlas"; Laya.loader.load(url,new Handler(this,hh)); //trace( Laya.loader.getRes(url) ); } private function hh():void { Laya.stage.addChild(new Image("MORNUI_Z_Gongneng/clip_xue_quan....

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

1129. 如何监听移动端软键盘的弹出和收回? [ 76%]

...sEvent.FOCUS_OUT,onFocusOut); private function onFocusIn(event:FocusEvent):void { textInput.text="你的键盘打开了"; } private function onFocusOut(event:FocusEvent):void { textInput.text="你的键盘消失了"; }   但这样操作貌似并不能完全满足我们的需求,因为以上方...

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

1130. 怎么对graphics画出来的图片进行鼠标点击拖动??? [ 76%]

...ePath, Handler.create(this, this.setup)); this.setup(); } private setup(): void { this.createApe(); this.showDragRegion(); } private createApe(): void { this.ape = new Sprite(); //this.ape.loadImage(this.ApePath); Laya.stage.addChild(this.ape); //这里是我注释掉的代码 //var texture: Texture...

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