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

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

941. 请问laya里的单件模式Singleton怎么实现? [ 55%]

...MainScene;      public static function get instance():MainScene{    if(!_instance){     _instance = new MainScene();    }    return _instance;   } 2016-11-11 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 tianxiang233 ...

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

942. 加载解析ByteArray问题 [ 55%]

..."atlas/byarr.byte",Loader.BUFFER); private function loadEnd(data:*):void { if (data is ArrayBuffer) { var byts:Byte = new Byte(data); byts.pos = 0; var fr:int = byts.getByte(); var a:int = byts.getInt32(); alert(fr);//这个值正常 alert(a);//这个值不正常,后面再读取都不正常了 } }...

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

943. 截屏的图片太大,微信无法分享,求助 [ 55%]

...大,微信无法分享,求助 let conch = Laya.Browser.window.conch;  if(conch){  conch.captureScreen(function(arrayBuff,width,height) {    conch.saveAsPng(arrayBuff,width,height,"/sdcard"+"/test.png" );  }  -------------------------------- 因为截屏的图片超过2M,安卓端会报...

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

944. 引擎这一句是不是疏忽了? [ 55%]

...         var rigidBody=this._nativeColliderObject;         if (rigidBody==null)             throw "Attempted to call a Physics function that is avaliable only when the Entity has been already added to the Scene.";         rigidBody.clearForces();         v...

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

945. 怎么解码网址的中文乱码 [ 55%]

...l);             var u:* = urlStr.split("?");             if (u[1] is String)             {                 u = u[1].split("&");                 var gets:Object = {};                 for (var i:String in u)                ...

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

946. 移动端h5项目如何获取多点触摸的坐标 [ 55%]

...ya.Event;   // 手机上才有 touches 属性 let touches = e.touches;   if (touches && touches.length == 2) { preRadian = Math.atan2( touches[0].stageY - touches[1].stageY, touches[0].stageX - touches[1].stageX);   Laya.stage.on(Event.MOUSE_MOVE, this, this.onMouseMove); } } 2019-09-25 0...

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

947. loop 我想在回调里暂停,然后在开启 [ 55%]

... ? i + 1 : 0;       this.noticeList.scrollBar.value = i * 5        if (i % 6 == 0) {         console.log("在这里停止", i)        }       else{ console.log("在这里开始", i)        }  });   2017-07-05 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找...

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

948. 移动端横竖屏适配(类似锁屏效果)? [ 55%]

...,this,onResize); } private function onResize():void { //横屏显示调整 if(Browser.width>Browser.height) { fillWidth=Browser.width; fillHeight=Browser.height; } //竖屏显示向横屏调整 else { fillWidth=Browser.height; fillHeight=Browser.width; } } } } 2016-07-18 0 0 分享 微博 QZONE ...

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

949. 关于打包App后Texture.getPixels此方法不能使用 [ 55%]

...n getPixels(x:Number, y:Number, width:Number, height:Number):Array {     if (Render.isWebGL) {        return RunDriver.getTexturePixels(this, x, y, width, height);     } else {       Browser.canvas.size(width, height);       Browser.canvas.clear();       Browser.context.drawTexture(...

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

950. 如何获取list下单元格的坐标点? [ 55%]

...andler(this,onClick); } private function onClick(e:Event,index:int):void { if(e.type==Event.CLICK) { trace("xy:"+list.getCell(index).x,list.getCell(index).y); } }上面的坐标是相对于list本身的,如果你想取得全局坐标可以通过localToGlobal方法来得到。 2016-12-15 1 1 分享...

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