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

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

1871. collider脚本当前帧销毁对象报错修复了吗? [ 70%]

...错误), //因此延迟一帧以销毁 Laya.timer.frameOnce(1, this, function () { this.weapon.destroy(); });   这个延迟一帧的bug修复了吗? 目前用到的直接销毁还是会报错,不知道是不是我逻辑问题。 谢谢! 2018-03-12 添加评论 免费帖 --> 分享 微博...

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

1872. MovieClip的target和currentTarget属性为undefined? [ 70%]

MovieClip的target和currentTarget属性为undefined? private function showNowPic():void{ for each(var ul:String in pics){ var mc:MovieClip = new MovieClip; mc.load(ul); this.addChild(mc); mc.on(Event.COMPLETE,this,stopNowMC) } } private function stopNowMC(e:Event):void{ trace(e.currentTarget); t...

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

1873. QQ里扫一扫打开网页,不响应Laya.Event.FOCUS事件,导致失去焦点后,声音异常 [ 70%]

...nager.playSound("sound/bg1.mp3", 0); Laya.stage.on(Laya.Event.FOCUS, null, function(){ console.log("获取焦点") Laya.SoundManager.playSound("sound/bg1.mp3", 0); }) Laya.stage.on(Laya.Event.BLUR, null, function(){ console.log("失去焦点") }) 2018-08-07 添加评论 免费帖 --> 分享 微博 Q...

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

1874. 切换位图,点击图片距离容器的区域也会触发点击事件 [ 70%]

切换位图,点击图片距离容器的区域也会触发点击事件 function TransitionImg() { this.flag = false; //判断条件 this.img1 = "../laya/assets/comp/haoyoubang-liang.png"; //地址 this.img2 = "../laya/assets/comp/haoyuobang-hui.png"; var img = new Laya.Sprite(); //实例 img.widt...

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

1875. 微信小游戏中加载unity导出的场景报错the .lh file root type must be Scene [ 70%]

...       /**     *@inheritDoc     */   __proto.onAsynLoaded=function(url,data,params){     var json=data[0]     if (json.type!=="Scene"){ if (url == "scene/Demo_Interiors.ls"){ console.log(data[0]); throw new Error("Scene: the .lh file root type must be Scene,please use other fu...

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

1876. Sprite-切换纹理 [ 70%]

...ey3.png"; private var flag:Boolean = false; private var ape:Sprite; public function Sprite_SwitchTexture() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.sta...

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

1877. 在Canvas模式下 drawTexture出错 [ 70%]

... 21:05 浏览: 1392 关注: 2 人 熊猫大侠 • 2018-01-19 09:20 public function Test1View() { Laya.timer.loop(10,this,draw); } private function draw():void { texture = Laya.loader.getRes("comp/lhjicon_5.png"); var temp:Texture = Texture.createFromTexture(texture,0,0,texture.sourceWidth...

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

1878. Laya.loader Progress回调形同虚设 [ 70%]

Laya.loader Progress回调形同虚设 private function beginLoad():void { //加载引擎需要的资源 Laya.loader.load([ "res/1.png", "res/2.png", "res/3.png", "res/4.png", "res/5.png", "res/6.png", "res/7.png" ], Handler.create(this, onLoaded),Handler.create(this, onProgress)); //Laya.loader.lo...

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

1879. 用LayaAir引擎解析Tiled Map地图(JavaScript-2D进阶篇(JS)-扩展模块) [ 70%]

...TiledMap/orthogonal.json",viewRect,Laya.Handler.create(this,onMapLoaded)); function onMapLoaded(){ //将原地图放大2倍 this.tMap.scale = 2; } ``` 运行效果如图8所示。 ![图8](img/8.png) (图8) #### 2.2.2 设置地图缩放的中心点 很明显,图8中的效果并不是我们想要的...

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

1880. 分享:LayaAir下如何加载和使用.JSON文件! [ 70%]

...a.net.Loader; import laya.utils.Handler; public class LayaAirDemo { public function LayaAirDemo() { Laya.init(500,400); Laya.loader.load("unpack.json",Handler.create(this,onLoaded),null,Loader.JSON); } private function onLoaded():void { var json:JSON=Laya.loader.getRes("unpack.json"); var str:String...

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