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

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

191. ProtocolBuffer通信 · LayaAir3.4 · 引擎文档 · LAYABOX [ 80%]

...ass() export class ProtobufDemo extends Laya.Script { onEnable() { console.log("Game start"); } } 2.2 Protobuf示例脚本 引入了protobuf模块就可以直接在项目中使用了,这里我们写了一个简单的示例DEMO,完整代码如下: // src/ProtobufDemo.ts // 引入生成的 proto...

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

192. js socket 连接不上 [ 80%]

...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> <head&g...

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

193. Laya.loader.create 加载进度问题 [ 80%]

...ading)); } 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

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

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

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

...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.owner);...

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

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

...==="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.GameSceneB...

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

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

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

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

198. socket大型项目回调 [ 79%]

...ssage:IMessage; constructor(){ if(!console.group){ console.group = console.log; console.groupEnd = function(){console.log("----")}; console.info = console.log; console.warn = console.log; console.error = console.log; } this._message = new Message(); this._package = new Package(); this.socket = null;...

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

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

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

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

200. 物体的x,y输出不一致的问题 [ 79%]

...一致: var player :Player = Laya.stage.getChildAt(i) as Player; console.log(player.x); 附:在Player中输出x的信息 一直为0 但是在Monster类中输出Player的x的数据一直是497,0,494,0,491,0,488,0.......这样的 2018-08-28 添加评论 免费帖 --> 分享 微博 QZ...

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