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

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

1211. 问一下这个问题要怎么改啊? [ 69%]

... picUrl = str; picX = x; picY = y; Laya.loader.load(picUrl, Handler.create(this, showBgImg)); } private function showBgImg():void { pic = new Image(); pic.graphics.drawTexture(Laya.loader.getRes(picUrl), picX, picY); Laya.stage.addChild(pic); } } }   Main.as package { import laya.display.*; import ...

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

1212. 粒子-粒子演示1 [ 69%]

...r = "#232628"; Stat.show(); Laya.loader.load(partPath, Laya.Handler.create(this, this.onAssetsLoaded), null, Loader.JSON); } onAssetsLoaded(settings) { // 当load数组的时候,回调函数传入的参数不再是资源,可以通过以下方法获取资源 // let settings = Laya.loader.getRes(p...

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

1213. textInput的单行输入&多行输入(TypeScript-LayaAir基础篇(TS)-文本) [ 69%]

..._CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; this.createSingleInput(); this.createMultiInput(); } private createSingleInput(): void { var inputText: Input = new Input(); inputText.size(350, 100); inputText.x = Laya.stage.width - inputText.width >> 1; inputText.y = (Laya...

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

1214. Texture如何转换成Texture2D有人搞过吗 [ 69%]

...要写上类型 Laya.loader.load([{url:url,type:"image"}], Handler.create(this,function(){ //接下来 }));5.接下来回调,卸载之前的资源 Laya.loader.clearRes(oldUrl);6.加载Texture2D   这样就原图片地址是个Texture2D,生成的URL地址是个Texture 2019-02-19 0 0 分享 微...

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

1215. 物理引擎bug [ 69%]

...接 提交 2 个回复 叔年心~厌世 赞同来自: for(var i=0;i<this.boneCtn.numChildren;i++){ let b=this.boneCtn.getChildAt(i); b.destroy(); b.removeSelf(); }这样写也不行 2019-09-06 0 1 分享 微博 QZONE 微信 Laya_Aaron 赞同来自: 这个问题没有上传demo 无法调试和...

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

1216. 场景directional_light,active问题 [ 69%]

...问题 测试代码: private sysActiveScene(){         var light = this.battleScene.getChildByName("directional_light");         light.active = !light.active;         TimerManager.instance.setTimeout(this.sysActiveScene,this,500); } this.sysActiveScene();就是每0.5秒设置...

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

1217. MovieClip 的 bug [ 69%]

...ERROR,"file not find"); return; } //保护修改-----end------------------ this.basePath =_atlasPath?Loader.getAtlas(_atlasPath).dir:_url.split(".swf")[0] + "/image/"; _initData(data);添加了这个保护后,代码不会报错,但是你的帧循环使用创建MC不会显示,不显示的原因...

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

1218. ls文件导入错误 [ 69%]

...ity导出一个文件,然后layabox中加载场景。 Laya.loader.create(this.strScene, Laya.Handler.create(this, this.onLoadScene)); private onLoadScene() { var scene: Laya.Scene = Laya.Scene.load(this.strScene); if (scene == null) { return; } this.mScene = scene;   大致的流程如上   错...

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

1219. 屏幕适配-自动横屏 [ 69%]

...tage.screenMode = Stage.SCREEN_HORIZONTAL; Laya.stage.bgColor = "#232628"; this.showText(); } private showText(): void { var text: Text = new Text(); text.text = "Orientation-Landscape"; text.color = "gray"; text.font = "Impact"; text.fontSize = 50; text.x = Laya.stage.width - text.width >> 1; text....

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

1220. 屏幕适配-自动竖屏 [ 69%]

....stage.screenMode = Stage.SCREEN_VERTICAL; Laya.stage.bgColor = "#232628"; this.showText(); } private showText(): void { var text: Text = new Text(); text.text = "Orientation-Portrait"; text.color = "gray"; text.font = "Impact"; text.fontSize = 50; text.x = Laya.stage.width - text.width >> 1; text.y...

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