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

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

711. [LayaAir 2.0] 如何用代码为Spirte添加2d物理特性 [ 91%]

...rite { private _boll1:Laya.Sprite; constructor() { super(); //物理模块 this._boll1 = new Laya.Sprite(); this.addChild(this._boll1); this._boll1.x = 20; this._boll1.loadImage('comp/btn_close.png'); let box:laya.physics.BoxCollider = this._boll1.addComponent(laya.physics.BoxCollider); box.height =...

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

712. socket通讯返回数据 [ 91%]

...a.Byte; constructor() { //初始化引擎 Laya.init(600, 400, Laya.WebGL); this.byte = new Laya.Byte(); //这里我们采用小端 this.byte.endian = Laya.Byte.LITTLE_ENDIAN; this.socket = new Laya.Socket(); //这里我们采用小端 this.socket.endian = Laya.Byte.LITTLE_ENDIAN; //建立连接 this...

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

713. 给模型动态添加脚本报错 [ 91%]

...s3D/prefabsModel/hanbao.lh");                 goldNode = this.scene_3d.addChild(sp);                 goldNode.transform.localPosition = new Laya.Vector3(this.startPos.x + (4.5 - Math.random() * 9), this.startPos.y, this.startPos.z + (2.5 - Math.random...

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

714. Laya调用wx接口,导出时总是多出一个this [ 91%]

Laya调用wx接口,导出时总是多出一个this 比如在一个类里写wx.login({...}),导出后就变成this.wx.login({}),然后就会出错得把this去掉。请问怎么解决这问题- -,手动删除么就... 2018-07-20 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找...

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

715. 不能成功调用 DiaLog Close 关闭方法 [ 91%]

...art 界面 */ var Start = (function(_super){ function Start(){ Start.super(this); // 注册点击开始事件 this.beginBtn.on(Laya.Event.CLICK,this,this.onBeginClick); // 注册跳转事件 this.linkMsleanBtn.on(Laya.Event.CLICK,this,this.onLinkClick); // 初始化 UI 界面显示 this.reset(); } /...

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

716. 陀螺仪与加速计(JavaScript-LayaAir基础篇(JS)-硬件设备相关) [ 91%]

...下面演示获取旋转方位信息: ```typescript Laya.init(550, 400); this.info = new Laya.Text(); this.info.fontSize = 50; this.info.color = "#FFFFFF"; this.info.size(Laya.stage.width, Laya.stage.height);  Laya.stage.addChild(this.info);  Laya.Gyroscope.instance.on(Laya.Event.CHANGE, this, o...

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

717. 2D光遮挡器与阴影 · LayaAir3.3 · 引擎文档 · LAYABOX [ 91%]

...,例如节点被添加到舞台后 onEnable(): void { Laya.loader.load(this.backgroundTexture).then(() => { this.createLightOccluder(); this.createSpotLight(); this.createBackground(); }); } // 创建2D光遮挡器 createLightOccluder(): void { this.lightOccluder.pos(233, 265); this.owner.addCh...

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

718. 为什么rotation、scale赋值了不管用? [ 91%]

...什么rotation、scale赋值了不管用? 我创建了一个Sprite3D: this.role3D = Laya.MeshSprite3D.load("3d/ben/Export.lh") this.role3D.transform.scale = new Laya.Vector3(0.5,0.5,0.5); this.role3D.transform.position = new Laya.Vector3(0,20,0); 以上的scale、position设置均不起作用,...

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

719. 1.76beta引擎库的BUG:Laya.List动态载入后,滑动时会将list框本身的滑动区域一并向滑动方向移动,会出现点击list中空白区域就无法滑动的情况 [ 91%]

...ber> = [];     constructor()     {         super();         this.list.vScrollBarSkin = '';         this.list.itemRender = Item_List;         this.list.renderHandler = new Laya.Handler(this, this.onItemRender);         this.list.scrollBar.elasticBackTime = 200;         ...

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

720. 打包APK运行,drag拖动出现问题;color="#0"程序直接崩溃 [ 91%]

...    Laya.loader.load([GameConfig.getAssetsFile("comp")],Handler.create(this, onComplet));                          }         private var imag:Image;         private function onComplet():void         {             imag=new Image("ui/comp/image.png");  ...

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