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

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

821. 发布到手机测试微信小游戏,文件大小超过4M怎么办? [ 83%]

...     “subpackages”: [         {             “name”: “stage1”,             “root”: “stage1”  //可指定一个目录,根目录下game.js会作为入口文件,目录下所有资源将会统一打包         },          {             “name”:...

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

822. Text类中竟然没有pos函数的api~ [ 83%]

...容相关的链接 提交 2 个回复 w1114367261 赞同来自: lhb1990711 stage.pos是作为二维坐标系的xy坐标,这个坐标系的00点位于stage的左上角,x的长就是你stage的宽,y的长就是你stage的高box,sprite等的坐标系00点为自身的轴心点, 你可以看一...

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

823. Button位移过后,点击区域改变 [ 83%]

...题,UI中的Button,在MornUI中摆放好位置后,在程序中根据stage的实际宽高调整了一下位置,但调整后,Button点击不了。重新设置hitArea也不行。 2017-11-28 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相...

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

824. dialog设置缩放问题 [ 83%]

...dialog.scale(dialog.scaleH, dialog.scaleH); dialog.x = Math.round(((Laya.stage.width - dialog.width * dialog.scaleH) >> 1) + dialog.pivotX);  dialog.y = Math.round(((Laya.stage.height - dialog.height * dialog.scaleH) >> 1) + dialog.pivotY);   希望官方能优化一下!!感谢 201...

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

825. 2.0版本可用的CameraMoveScript.ts [ 83%]

...e3D = this.owner.scene;             var offsetX: number = Laya.stage.mouseX - this.lastMouseX;             var offsetY: number = Laya.stage.mouseY - this.lastMouseY;             var yprElem: Laya.Vector3 = this.yawPitchRoll;             yprElem.x -= of...

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

826. Sprite3D添加组件或脚本(TypeScript-3D基础(TS)-LayaAir3D之精灵) [ 83%]

... ScriptSample() { constructor(){ //初始化引擎 Laya3D.init(0, 0); Laya.stage.scaleMode = Laya.Stage.SCALE_FULL; Laya.stage.screenMode = Laya.Stage.SCREEN_NONE; //预加载所有资源 var resource:Array = ["res/threeDimen/skinModel/LayaMonkey/LayaMonkey.lh"]; Laya.loader.create(resource, Laya.Ha...

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

827. layaAir真的没办法做涂鸦板? [ 83%]

... 2018-08-22 15:24 @138*****047:var arr=[]; var s=new Laya.Sprite(); Laya.stage.addChild(s); Laya.stage.on(Laya.Event.MOUSE_DOWN,this,function(e){ arr.push([e.stageX,e.stageY]); Laya.stage.on(Laya.Event.MOUSE_MOVE,this,bb) }) Laya.stage.on(Laya.Event.MOUSE_UP,this,function(){ Laya.stage.off(Laya.Even...

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

828. 页面要在移动设备上显示,到底要怎么设置啊,怎么弄都是PC风格 [ 83%]

...是你想要的,你试下适配模式的 //设置水平对齐    Laya.stage.alignH = "center"; //设置垂直对齐    Laya.stage.alignV = "middle";    ​Laya.stage.scaleMode = Stage.SCALE_SHOWALL; 你游戏的Laya.init的宽高,等于你游戏显示的总宽高,试下! 2017-09-05 0 0...

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

829. this.bitmap.activeResource is not a function [ 83%]

...//开放域 this._openZone = new Laya.Sprite(); } this._openZone.size(Laya.stage.width,Laya.stage.height); if(this._openZone.parent) return; console.log("打开开放域",Laya.Browser.onMiniGame) Laya.stage.addChild(this._openZone); this._openZone.x = vx; this._openZone.y = vy; if(Laya.Browser.onMin...

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

830. sprite 设置为静态变量后,无法从舞台移除 [ 83%]

...WebGL); Stat.show(); sp=new Sprite(); sp.loadImage("background.jpg"); Laya.stage.addChild(sp); Laya.stage.on(Event.CLICK,this,onClick); function onClick():void { // TODO Auto Generated method stub Laya.stage.off(Event.CLICK,this,onClick); Laya.stage.removeChild(sp); Loader.clearRes("background.jpg")...

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