大约有 2,033 项符合查询结果, 库内数据总量为 31,625 项。 (搜索耗时: 0.0202 秒)
Laya_社区(1424) Laya2.0_文档(233) Laya_示例(141) Laya2.0_示例(117) Laya3.0_api(61) Laya3.0_文档(44) Laya2.0_api(7) laya_api(6)
... 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
...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
..._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
...要写上类型 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
...接 提交 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
...问题 测试代码: 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
...ERROR,"file not find"); return; } //保护修改-----end------------------ this.basePath =_atlasPath?Loader.getAtlas(_atlasPath).dir:_url.split(".swf")[0] + "/image/"; _initData(data);添加了这个保护后,代码不会报错,但是你的帧循环使用创建MC不会显示,不显示的原因...
来源: Laya_社区 发布时间: 20180910
...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
...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
....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