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

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

221. 如何将stage背景设置为透明 [ 66%]

...& value !== "black" && value !== "#000000") { _wgColor = Color.create(value)._color; } else { _wgColor = null; } }   if (value) { Render.canvas.style.background = value; } else { Render.canvas.style.background = "none"; } } 但要如何用呀,试过 Laya.stage.bgColor = null; Laya.sta...

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

222. AS代码如何new一个js库中的类并且使用这个类 [ 66%]

...要的类   //加载 Laya.loader.load(getModuleJSPath("abc.js"), Handler.create(this,loadedHandler)); function loadedHandler(data:*):void{       //加载完回调       __JS__('window.eval(data + "//# sourceURL=" + "abc.js")');     //new需要的类       var loginView:* = __JS__('new co...

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

223. 如何获取动画的长度? [ 66%]

...载完回调还是获取不到   tl.loadAnimation("s.ani", Laya.Handler.create(this, () => { var bounds = tl.getGraphicBounds(); console.log(bounds.width) }, [tl]));   还是0 2018-01-24 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起...

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

224. 鼠标交互-拖动 [ 65%]

....stage.bgColor = "#232628"; Stat.show(); Laya.loader.load(ApePath, Handler.create(this, this.setup)); } setup() { this.createApe(); this.showDragRegion(); } createApe() { const Sprite = Laya.Sprite, Event = Laya.Event; this.ape = new Sprite(); this.ape.loadImage(ApePath); Laya.stage.addChild(this.ap...

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

225. destroyChildren 销毁对象后为什么依旧能取得内部属性 removeChildren destroyChildren的区别 [ 65%]

...对象,统计面板的显存和内存就会显示成负数 Laya.Handler.create和new Laya.Handler有啥区别 1.7.20beta有bug,帧属性面板打不开 3d显示对象克隆体超出舞台不再显示的bug2.1.0.btea1 怎么讲layaAir里的显示对象添加到matter.js里的物理引擎世界里...

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

226. Laya tiledmap 监听事件未响应 [ 65%]

...       this.tiledMap = new Laya.TiledMap();          this.tiledMap.createMap("resource/tiledMap/isometric_grass_and_water.json", new Rectangle(0, 0, Laya.stage.width, Laya.stage.height), Handler.create(this, this.mapLoaded), null, new Point(1600, 800));      }      private mapLoaded():...

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

227. prefab添加runtime脚本 comp._addComponentInstance is not a function [ 65%]

... comp._addComponentInstance is not a function     at Function.SceneUtils.createComp (laya.core.js:11586)     at Function.SceneUtils.createByData (laya.core.js:11507)     at Prefab.__proto.create (laya.core.js:19301)     at Function.Pool.getItemByCreateFun (laya.core.js:5825)     at GameCon...

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

228. 百度小游戏 内存不断增大的情况 [ 65%]

...,400); Laya.loader.load([{url:"res/atlas/comp.json",type:"atlas"}],Handler.create(this,this.onLoadUi)); } __proto.onLoadUi=function(){ Laya.timer.loop(100,this,this.onLoaded); } __proto.onLoaded=function(){ if(this.isOpen){ return; } this.isOpen=true; var testView=new TestView(); Laya.stage.addChild...

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

229. 在Unity中设置动画事件(JavaScript-3D基础(JS)-LayaAir3D之Animator动画) [ 65%]

...en/scene/LayaScene_AnimationEvent/Conventional/layaScene.ls", Laya.Handler.create(this, function(scene) { Laya.stage.addChild(scene); //获取cube对象 var cube = scene.getChildByName("Cube"); //添加组件(脚本) var _script = cube.addComponent(SceneScript); //label用于显示 var _lab = new La...

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

230. 发布到微信小游戏后Timer的getHandler报错了 [ 65%]

...etHandler (http://127.0.0.1:55825/game/code.js:22446:17) at Timer.__proto._create (http://127.0.0.1:55825/game/code.js:22320:21) at Timer.__proto.once (http://127.0.0.1:55825/game/code.js:22365:8) at MyData.__proto.catchCard ( 于是我定位到编译好的code.js, 是在Timer的这个函数中,...

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