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

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

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

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

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

822. 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

823. 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

824. 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

825. 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

826. 页面要在移动设备上显示,到底要怎么设置啊,怎么弄都是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

827. 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

828. 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

829. [LayaAir3]播放spine时候报错 [ 83%]

...22)     at Render2DProcessor.apply (Render2DProcessor.js:32:23)     at Stage._render2d (Stage.js:447:23)     at Stage.render (Stage.js:392:1)     at Render.loop (Render.js:49:16)     at loop (Render.js:39:22) spine播放的时候报错,cocos ceator里能正常播放 附件 : --> LayaProj...

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

830. LayaAir和原生DOM交互(ActionScript-2D进阶篇(AS3)-扩展模块) [ 83%]

...blic function LayaUISample() { //初始化引擎 Laya.init(600, 400); Laya.stage.bgColor ="#cccccc"; var data:String= "data:image/svg+xml,"+'' + '' + '' + 'I like ' + '' + 'cheese' + '' + '' + ''; var sp:Sprite = new Sprite(); sp.loadImage(data,0,0,200,200); Laya.stage.addChild(sp); } } } ``` 通过...

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