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

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

471. 【简单跑酷--JS版】---Lv.4 添加玩家 [ 49%]

...a.Loader.ATLAS }); //加载图集资源 Laya.loader.load(asset, laya.utils.Handler.create(this, onLoaded), laya.utils.Handler.create(this, onLoading, null, false)); 嗯 加载改好了 我们先来测试一下 图片是否能拿到 我们在onLoaded方法里面 写一点测试代码 如下   functi...

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

472. 通过laya设计模式制作的,要怎么给按钮绑定事件呢? [ 49%]

...// 预加载图集 Laya.loader.load("res/atlas/comp.atlas", Laya.Handler.create(this, this.onLoaded ), null, Laya.Loader.ATLAS) } onLoaded(){ Laya.stage.addChild(new TopUI()) Laya.stage.addChild(new TabUI()) this.getGold.on(Laya.Event.MOUSE_DOWN,this,function(){ console.log("点击事...

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

473. 动效问题,没有 ui.TestPUI,官方文档是错的,几年了至今无解答 [ 49%]

...fConfPath = './res/atlas/comp.atlas' Laya.loader.load(aniEffConfPath, Laya.Handler.create(this, this.onLoaded)) onLoaded(){ // Laya.ClassUtils.regClass('ui.TestPUI', ui.TestPUI) var efc = new ui.TestPUI(); Laya.stage.addChild(efc); } 按照官方文档,运行后报错 Main.js:61 Uncaught Reference...

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

474. 简单粒子效果,发布成单机版apk在移动端安装运行,结果显示不出来 [ 49%]

.../?Particle_T1  ) 主要就是: Laya.loader.load("SnowParticle.part", Handler.create(this, onAssetsLoaded), null, Loader.JSON);           public function onAssetsLoaded(settings:ParticleSetting):void         {             sp = new Particle2D(settings);            ...

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

475. rigidBody.applyForce 物体不会移动 [ 49%]

...载场景人物腳色 Laya.Scene3D.load( "res/build5/SampleScene.ls", Laya.Handler.create(this, this.onComplete) ); //射线初始化(必须初始化) this._ray = new Laya.Ray( new Laya.Vector3(0, 0, 0), new Laya.Vector3(0, 0, 0) ); //初始化变量 this.point = new Laya.Vector2(); this._outHit...

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

476. 开发数据域报错wx.getFileSystemManager is not a function [ 48%]

...和图集Laya.loader.load(["json/reward.json","res/atlas/test.atlas"],Laya.Handler.create(null,function(){//加载完成//使接口将图集透传到子域Laya.MiniAdpter.sendAtlasToOpenDataContext("res/atlas/test.atlas"); //使接口将json投促函到子域Laya.MiniAdpter.sendJsonDataToDataC...

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

477. 微信小游戏资源总是加载旧的资源 [ 48%]

...ATLAS},          {url: "res/atlas/xxx3.json", type: Loader.ATLAS}], Handler.create(...   并且在这之前已经加载并设置了版本文件 URL.version=Laya.loader.getRes("resVersion.json");   我们游戏已经在微信小游戏之外的平台上线了的,以前热更新都没问题...

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

478. tiledmap 可以在图块层的指定格子上添加Sprite吗 [ 48%]

...dMap地图 this.tMap.createMap("map/"+mapname+".json",viewRect, laya.utils.Handler.create(this, this.test));//, null, new Laya.Point(1600, 816)); } private test(){ var testLayer:Laya.MapLayer = this.tMap.getLayerByName("player"); this.tMapPlayer = new Laya.Sprite(); this.tMapPlayer.graphics.drawRect...

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

479. LayaAir和原生DOM交互(TypeScript-2D进阶篇(TS)-扩展模块) [ 48%]

...x.com/"; this.qrcode.makeCode(url); Laya.stage.once("click",this,this.clickHandler); this.qrcodeSp = new Laya.Sprite(); Laya.stage.addChild(this.qrcodeSp); } private clickHandler():void{ var url:string = this.qrcode._oDrawing._elImage.src;//获取,注意这里是异步的,开发者可以加个...

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

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

...所以加载时要写上类型 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...

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