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

大约有 4,034 项符合查询结果, 库内数据总量为 30,906 项。 (搜索耗时: 0.0076 秒)

881. laya2.0 截图功能分享,直接截取屏幕上所有对象 [ 89%]

...dth, height, x, y) { if (!SwitchHelper.screenDraw) { return null; }  if (!this.tempTexture2D) { this.tempTexture2D = new Laya.Texture2D(system.width, system.height); } if (!this.tempTexture) { this.tempTexture = new Laya.Texture(this.tempTexture2D); } let cans = document.getElementById("layaCanvas"...

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

882. startDrag 被拖拽物体所在view发生旋转后的bug [ 89%]

...        __proto.loop=function(){             var point=this._parent.getMousePoint();             var mouseX=point.x;             var mouseY=point.y;             var offsetX=mouseX-this._lastX;             var offsetY=mouseY-this._la...

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

883. TypeScript Json 数据解析 [ 89%]

...te on2DComplete(): void { Laya.loader.load("zxc.json", Laya.Handler.create(this,this. onLoadConfigComplete),null,Laya.Loader.JSON); } wayPoints:JSON; private onLoadConfigComplete(): void { this.wayPoints = Laya.loader.getRes("zxc.json") as JSON; console.log(this.wayPoints.name); //这里会报name ...

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

884. 使用bind移除事件报错 [ 89%]

使用bind移除事件报错 在侦听事件中添加了bind,如下: this.parent["timer1"].addEventListener(TimerEvent.TIMER,bind(this,this.timer))? 2015-11-10 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 c...

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

885. 播放视频只有声音没有图像 [ 89%]

...ginGame extends Laya.Scene { constructor() { super(); LoginGame.instance = this; Laya.MouseManager.multiTouchEnabled = false; this.loadScene("LoginGame.scene"); } onEnable() { SoundManager.playMusic("audio/梅林茂 - 静かな古都.mp3", 0); this.login_game_button.on(Laya.Event.CLICK, this,this.on...

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

886. 对话框点击空白处无法关闭 [ 89%]

...话框var testUI=(function(_super){ function testUI(){ testUI.__super.call(this); } CLASS$(testUI,'ui.testUI',_super); var __proto__=testUI.prototype; __proto__.createChildren=function(){ laya.ui.Component.prototype.createChildren.call(this); this.createView(testUI.uiView); } testUI.uiView={"type":"...

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

887. 设置后box2d 的 worldRoot 后平移场景 物理世界原地不动 [ 88%]

... 是要模仿镜头移动功能吗,这样可以 onAwake() { const self = this; self.gameObj = self.owner as Laya.Sprite; Laya.Physics.I.worldRoot = self.gameObj; this.cameraRect = new Laya.Rectangle(0, 0, 2000, 1000); this.gameObj.scrollRect = this.cameraRect; } onUpdate() { this.cameraRect.x = th...

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

888. 小游戏安卓不支持filters [ 88%]

...lters.GlowFilter("#00CCFF", 10, 0, 0); //设置滤镜集合为发光滤镜 this.cutLayer.filters = [glowFilter]; 测试了一下 最新的引擎版本 给一个sprite对象版定一个filter 安卓木有办法显示  上面的cutLayer 是一个sprite对象 我会通过手指的移动去绘制线条...

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

889. 【求助】关于Cannot read property 'visible' of undefined问题 [ 88%]

...wFoods():void{ foodSprite = new Sprite(); Laya.stage.addChild(foodSprite); this.index = 0; foodsList = new Array(); foodsList.push(new Food("菜品1", "1", 0)); foodsList.push(new Food("菜品2", "2", 1)); foodsList.push(new Food("菜品3", "3", 2)); foodsList.push(new Food("菜品4", "4", 3)); food...

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

890. Laya内嵌iframe预览时不显示网页,编辑器和开发者工具上没问题 [ 88%]

...iframe预览时不显示网页,编辑器和开发者工具上没问题 this.iframe = Laya.Browser.document.createElement("iframe");         this.iframe.style.position ="absolute";//设置布局定位。这个不能少。         this.iframe.style.zIndex = 1000;//设置层级     ...

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