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

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

111. 网络和格式-Socket [ 86%]

...s://echo.websocket.org:80"); output = socket.output; socket.on(Event.OPEN, this, onSocketOpen); socket.on(Event.CLOSE, this, onSocketClose); socket.on(Event.MESSAGE, this, onMessageReveived); socket.on(Event.ERROR, this, onConnectError); } function onSocketOpen() { console.log("Connected"); // 发...

来源: Laya_示例 发布时间: 20251209

112. 图片添加点击事件 有的不生效 [ 86%]

...击事件 有的不生效 private init():void { //添加点击事件处理 this.v_btn_boy.on(Laya.Event.CLICK, this, this.onClickBtnBoy); this.v_btn_friend.on(Laya.Event.CLICK, this, this.onClickBtnFriend); this.v_btn_shop.on(Laya.Event.CLICK, this, this.onClickBtnShop); console.log("init main scene...

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

113. 物体随着鼠标滑动旋转脚本 [ 86%]

...旋转脚本 function ObjectRotate() {          ObjectRotate.super(this);//这里不太清楚作用       //最终鼠标在X轴上的值     this.lastMouseX = NaN;           //最终鼠标在Y轴上的值                  this.lastMouseY = NaN;                ...

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

114. 用Loader加载完atlas,然后使用animation播放问题 [ 86%]

用Loader加载完atlas,然后使用animation播放问题 this._load = new Laya.Loader() this._load.on(Laya.Event.ERROR, this, this.onError); this._load.on(Laya.Event.COMPLETE, this, this.loadComplete); this._load.load(this._data.url, Laya.Loader.ATLAS, true); 加载完成后 this._ani = new Animat...

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

115. image在相应loaded的时候,无法正确获取高度 [ 86%]

...mic extends Laya.Image { matterBody: Matter.Body; constructor() { super(); this.on('start', this, this.init); } private init():void { console.log("init", this.x, this.y, this.width, this.height, this.scaleX, this.scaleY); var createOption: any = { isStatic: false, }; this.matterBody = Matter.Bodies....

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

116. 文字在框内滑动、滚动文本 [ 86%]

... Laya.init(800,800,Laya.WebGL); creatText(); function creatText(){      this.txt=new Laya.Text();      this.txt.overflow=Laya.Text.SCROLL;//必须是SCROLL才能实现滑动      this.txt.text="=========================================================================================\n" +  ...

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

117. HttpRequest感觉没有发成功 [ 86%]

...; xhr.http.timeout = 10000;//设置超时时间; xhr.once(Event.COMPLETE,this,completeHandler); xhr.once(Event.ERROR,this,errorHandler); xhr.on(Event.PROGRESS,this,processHandler); xhr.send("https://www.baidu.com","","get","text"); function processHandler(data){ console.log(data); console.log("pro...

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

118. spine动画放大后,遮罩显示不正常 [ 86%]

...); //设置单例的引用方式,方便其他类引用 GameUI.instance = this; //关闭多点触控,否则就无敌了 Laya.MouseManager.multiTouchEnabled = false; //加载场景文件 this.loadScene("test/TestScene.scene"); }  onEnable() {         this.loadActor(this.actor1,"comp/r_01_...

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

119. tab 是否可以做到左右滑动切换view呢? [ 86%]

...现。 2016-08-23 0 0 分享 微博 QZONE 微信 asdf131 赞同来自: { this.on(laya.events.Event.MOUSE_DOWN ,this, this.onMouseDown);         this.on(laya.events.Event.MOUSE_UP ,this, this.onMouseUp);              }     private onMouseDownX : number;     private onMouseDownY :...

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

120. WebSocket发送与接收数据(TypeScript-LayaAir基础篇(TS)-数据与通信) [ 86%]

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

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