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

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

301. 使用百度地图显示当前位置(TypeScript-LayaAir基础篇(TS)-硬件设备相关) [ 73%]

...Geolocation.enableHighAccuracy = true; Laya.Geolocation.watchPosition(Laya.Handler.create(this, this.updatePosition), Laya.Handler.create(this, this.onError)); // 绑定convertToBaiduCoord作用域 this.convertToBaiduCoord = this.convertToBaiduCoord.bind(this); } } new WatchPosition(); ``` ​ 由...

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

302. 请问怎么制作一个layabox js版本的加载效果 [ 73%]

...per(this); var Stage = Laya.Stage; var ProgressBar = Laya.ProgressBar; var Handler = Laya.Handler; var WebGL = Laya.WebGL; var progressBar; Laya.init(1024, 600,WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.sta...

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

303. 在Laya2上 getGraphicBounds获取失败 [ 73%]

...败 =10.5pt看4张图就知道了,图片是有加载显示成功,但是在handler里面返回的参数为undefined,getGraphicBounds内容始终为0   附件 : --> 2018-11-17 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2 ...

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

304. 使用百度地图 · LayaAir3.3 · 引擎文档 · LAYABOX [ 73%]

...Geolocation.enableHighAccuracy = true; Laya.Geolocation.watchPosition(Laya.Handler.create(this, this.updatePosition), Laya.Handler.create(this, this.onError)); // 绑定convertToBaiduCoord作用域 this.convertToBaiduCoord = this.convertToBaiduCoord.bind(this); } } 由于本例不需要使用LayaAir...

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

305. 在微信小游戏中使用BitmapFont会导致报错. [ 73%]

...0); //激活资源版本控制 Laya.ResourceVersion.enable("version.json", Handler.create(null, beginLoad), Laya.ResourceVersion.FILENAME_VERSION);  function beginLoad(){     let timerFont = new Laya.BitmapFont();     timerFont.loadFont('res/timerfont.fnt', Laya.Handler.create(this, () =&gt...

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

306. 再问:tween对象的回收利用 [ 73%]

...props 变化的属性列表,比如{x:100,y:20,ease:Ease.backOut,complete:Handler.create(this,onComplete),update:new Handler(this,onComplete)}。 * @param duration 花费的时间,单位毫秒。 * @param ease 缓动类型,默认为匀速运动。 * @param complete 结束回调函数。 * @para...

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

307. 仅在Android微信小游戏下图片错乱 [ 73%]

...oader.getRes("file_list.json") Laya.loader.load("res/ui/share@atlas0.png", Handler.create(this, this.onLoaded), null, Loader.IMAGE, 1, true, null, true) } static onLoaded(res){ console.log("public assets inited !!!!") console.log(Laya.loader.getRes("res/ui/share@atlas0.png"))//此处会报循环引...

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

308. 物理碰撞器(TypeScript-3D基础(TS)-LayaAir3D之物理系统) [ 73%]

...ngMaterial(); Laya.Texture2D.load("res/threeDimen/Physics/grass.png", Laya.Handler.create(this, function(tex:Laya.Texture2D) { planeMat.albedoTexture = tex; })); //设置纹理平铺和偏移 planeMat.tilingOffset = new Laya.Vector4(10, 10, 0, 0); //设置材质 plane.meshRenderer.material = planeMa...

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

309. 关于Laya.loader.load和getRes的问题 [ 73%]

...2:使用drawTexture Laya.loader.load("../../../../res/apes/monkey2.png", Handler.create(this, function():void { var t:Texture = Laya.loader.getRes("../../../../res/apes/monkey2.png"); var ape:Sprite = new Sprite(); ape.graphics.drawTexture(t,0,0); Laya.stage.addChild(ape); ape.pos(200, 0); })); ...

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

310. 游戏遇到个bug, [ 73%]

... 代码如下 Laya.Tween.to(spring2,{scaleX:1.0,scaleY:1.0},500,null,Laya.Handler.create(this,function(){             if(!spring2.destroyed){ // 添加判断后就不出bug了                 Laya.Tween.to(spring2,{alpha:0},300,null,Laya.Handler.create(this,function(){           ...

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