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

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

1001. 在Laya2上 getGraphicBounds获取失败 [ 87%]

...8-11-19 10:53 浏览: 1979 关注: 2 人 忽啊忽啊 • 2018-11-21 13:59 this.sp = new Laya.Sprite(); this.sp.loadImage("Attack_0_0002.png", Laya.Handler.create(this, (data)=>{ this.sp.graphics.drawTexture(this.sp.texture); var bounds = this.sp.getGraphicBounds(true); })); 这样绘...

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

1002. 2D灯光与网格 · LayaAir3.4 · 引擎文档 · LAYABOX [ 87%]

...和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.light1Render = this.light1.getComponent(Laya.FreeformLight2D); this.mesh1Render = this.mesh1.getComponent(Laya.Mesh2DRender); this.mesh2Render = this.mesh2.getComponent(Laya.Mesh2DRender); //设置mesh1位于0层(Default...

来源: Laya3.0_文档 发布时间: 20251010

1003. 模型与动画的导入使用 · LayaAir3.4 · 引擎文档 · LAYABOX [ 87%]

...("girl/girl.lh").then(res => { let girl : Laya.Sprite3D = res.create(); this.scene3D.addChild(girl); //获得Animator this._animator = girl.getComponent<Laya.Animator>(Laya.Animator); }); this.on( Laya.Event.MOUSE_DOWN, this, this.switchAni ); } switchAni(): void { if (this._isRun) { //播...

来源: Laya3.0_文档 发布时间: 20251010

1004. 为什么获取不到getBounds()的width,height [ 87%]

...tion中获取不到动画的显示区域,用控制台输出都是0 还有this.body.pos(-bound.width / 2, -bound.height / 2);是动画里面的 feiji.pos(Laya.stage.mouseX, Laya.stage.mouseY);是鼠标监听事件 2个都是设置this.body的位置呢。先运行谁,还有  //设置机身的锚...

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

1005. Laya.timer.frameLoop(1, this, onLoop); 的使用问题 [ 87%]

Laya.timer.frameLoop(1, this, onLoop); 的使用问题 使用这个方法 单独浏览器运行和微信扫二维码运行都 没问题 但是放到了小游戏 就一卡一卡一卡一卡 最后卡死了。 2018-07-02 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 ...

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

1006. TieldMap is not counstructer [ 87%]

...is not counstructer 代码如下: //创建TiledMap实例         this._tMap = new TiledMap();         //创建Rectangle实例,视口区域         var viewRect:Laya.Rectangle = new Laya.Rectangle();         console.log(this._tMap);         //创建T...

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

1007. ConchInput settype无效 [ 87%]

...settype无效 __getset(0,__proto,'type',function(){         return this._type;     },function(value){         console.info(value)         if (value=="password")             this._getCSSStyle().password=true;         else         this._getCSSSty...

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

1008. 最新版本绘制100x100个sprite ios不能显示 [ 87%]

...制100x100个sprite ios不能显示 /* 游戏地图 */ function GameMap(){ this.MapRowNum = 100; this.MapColNum = 100; GameMap.super(this); this.init(); } Laya.class(GameMap, "GameMap", laya.display.Sprite); var _proto = GameMap.prototype; _proto.init = function(){ var boxSp = new laya.display.Sprit...

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

1009. Laya.Handler.create和new Laya.Handler有啥区别 [ 87%]

Laya.Handler.create和new Laya.Handler有啥区别 this.sList.mouseHandler = Laya.Handler.create(this, this.onMouse);//鼠标响应事件 this.sList.mouseHandler = new Laya.Handler(this, this.onMouse) ; // 鼠标事件响应. 2017-04-25 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有...

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

1010. 怎么播放声音? [ 87%]

...var bg_sound:Laya.Sound =new Laya.Sound(); bg_sound.on(Laya.Event.COMPLETE,this,this.loadcom_f); bg_sound.on(Laya.Event.PROGRESS,this,this.loadcom_f); bg_sound.on(Laya.Event.ERROR,this,this.loadcom_f); bg_sound.load("res/bg.mp3"); private loadcom_f(e:Laya.Event):void{ console.log("------------------...

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