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

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

141. 继承Scene没有onEnable [ 80%]

...    super();     }     public onAwake():void{         console.log(1111);     } }   2.继承Sprite 执行后会有onAwake         let t = new tt();         Laya.Scene.root.addChild(t);     } } //激活启动类 new Main();  class tt extends Laya.Sprite{ ...

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

142. 微信小游戏提审后,提示说代码侵权 [ 79%]

...r traceName = "xxxx";//添加的干扰代码 var funString = '_xxxx_fun(){ console.log("';//添加的方法体 var root_Url = "D:/code/project/src";//项目diam路径 fileDisplay(path.resolve(root_Url)); /** * 文件遍历方法 * @param filePath 需要遍历的文件路径 */ function fileDisplay(f...

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

143. Laya.loader.create 加载进度问题 [ 79%]

...AssetsLoading)); } ModelManager.prototype.onCreateComplete = function () { console.log("onCreateComplete"); var pipe = Laya.loader.getRes("res/Pipe/Pipe/a.lh"); console.log("pipe", pipe); } ModelManager.prototype.onAssetsLoading = function (progress) { console.log("progress = ",progress); } 打印...

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

144. js socket 连接不上 [ 79%]

...r(app); var io = require('socket.io').listen(server); server.listen(8888); console.log("服务器启动"); io.on('connection', function (ws) { console.log('客户端连接成功!'); ws.on('foo', function(data){ console.log(data); }); }); 自己写的html页面 <!DOCTYPE html> <html> &l...

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

145. Laya.Byte使用getUint16读取错误 [ 79%]

Laya.Byte使用getUint16读取错误 var bytes1 = new Laya.Byte([0,8]); console.log('++',bytes1.getUint8(),bytes1.getUint8()); var bytes2 = new Laya.Byte([0,8]); console.log('++',bytes2.getUint16()); var bytes3 = new Laya.Byte([0,8,0,0]); console.log('++',bytes3.getUint32());   采用上面测试...

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

146. curmem 怎么进行销毁 [ 79%]

... var asset:Image = assets; //查看log,清理前资源一直在内存中 console.log(Laya.loader.getRes(asset)); //调用清理方法 Laya.loader.clearRes(asset); //查看log,清理后,资源被卸载 console.log(Laya.loader.getRes(asset)); sp.destroy(); 这些都测试过,没有消减 curme...

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

147. RopeJoint代码动态创建 无法设置otherbody [ 79%]

...mponent(Laya.RopeJoint);         this.rope.otherBody=lala;         console.log(lala);         let collider:Laya.CircleCollider=this.owner.getComponent(Laya.CircleCollider);         this.rope.otherAnchor=["540","1060"];         this.rope.maxLength=286;         console.log(this...

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

148. 3D场景跳转到2D场景问题 [ 79%]

...ner.name==="end"){ // this.owner.parent.removeSelf(); //删除自身场景 console.log(this.owner.parent) console.log(this.owner.parent.parent); //创建胜利的UI界面 let victoryScene=new VictoryScene(); Laya.stage.addChild(victoryScene);   this.isDelete=true;  // console.log(Scene3DControl.Ga...

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

149. Byte二进制读写(TypeScript-LayaAir基础篇(TS)-数据与通信) [ 79%]

...始读入byte中。省略其中的浮点数20.0和整数16 byte.pos = 0;// console.log(byte.readUTFString())//从byte中读出字符串。 ``` - 读取数据 **getByte**():number在字节流中读一个字节。 **getInt16**():number在当前字节偏移量位置处读取 Int16 值。 **getInt32**()...

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

150. 切换后台时,引擎如何判断是否停止定时器? [ 79%]

...rameLoop);     }      private onFrameLoop():void{         console.log("delta:",Laya.timer.delta);     }      private onFocus(): void {         console.log("onFocus:");     }      private onBlur(): void {         console.log("onBlur:");     } }...

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