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

大约有 1,210 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0057 秒)

151. Keyboard Event如何获取按下某个键 [ 88%]

Keyboard Event如何获取按下某个键 定义了一个Input,绑定了键盘事件:this._ipt.on(Laya.Event.KEY_DOWN, this, this.OnInput); private OnInput(evt : EVENT) : void { // 这里怎么获取具体哪个键被按下?。。。 } 2018-11-08 添加评论 免费帖 --> 分享 微博 QZONE ...

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

152. Laya.Socket 是不是不支持Safari浏览器二进制格式的数据传输? [ 88%]

...); // this.socket.connectByUrl("ws://localhost:8989"); this.socket.on(Laya.Event.OPEN, this, this.openHandler); this.socket.on(Laya.Event.MESSAGE, this, this.receiveHandler); this.socket.on(Laya.Event.CLOSE, this, this.closeHandler); this.socket.on(Laya.Event.ERROR, this, this.errorHandler); } priva...

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

153. 求教Event.KEY_DOWN和Event.MOUSE_DOWN调用window.open相关问题 [ 88%]

求教Event.KEY_DOWN和Event.MOUSE_DOWN调用window.open相关问题 点击的调用函数: private function OnDown(e:Event):void { Browser.window.open("http://baidu.com"); } Laya.stage.on(Event.KEY_DOWN, this, OnDown);//正常 Laya.stage.on(Event.MOUSE_DOWN, this, OnDown);//被拦截 La...

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

154. 版本号:2.0.2 beta, 在sound文件夹下音乐播放不了,放入到res文件夹下可播放 [ 88%]

... = Laya.Sprite; import Stage = Laya.Stage; import Text = Laya.Text; import Event = Laya.Event; import SoundManager = Laya.SoundManager; import Browser = Laya.Browser; import Handler = Laya.Handler; import WebGL = Laya.WebGL; export default class Test_11_Sound {  //声明一个信息文本 private t...

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

155. 缓动-缓动函数演示 [ 88%]

...ar Sprite = Laya.Sprite; var Stage = Laya.Stage; var Text = Laya.Text; var Event = Laya.Event; var List = Laya.List; var Browser = Laya.Browser; var Ease = Laya.Ease; var Handler = Laya.Handler; var Tween = Laya.Tween; var WebGL = Laya.WebGL; var character; var duration = 2000; var tween; (function(...

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

156. 小游戏环境下 声音的缓存机制导致更换声音文件失败 [ 88%]

...niSound._audioCache[this.readyUrl]) {                 this.event(/*laya.events.Event.COMPLETE*/"complete");                 return;             }             console.log(url);             if (MiniAdpter.autoCacheFile && Mini...

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

157. 引擎socket类_onMessage bug [ 88%]

...       if (this.disableInput && data) {             this.event(Event.MESSAGE, data);             return;         }         if (this._input.length > 0 && this._input.bytesAvailable < 1) {             this._input.clear();             this._addIn...

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

158. 超过最大调用堆栈大小 [ 88%]

...:8383");         output = socket.output;         socket.on(Event.OPEN, this, this.onSocketOpen);         socket.on(Event.CLOSE, this, this.onSocketClose);         socket.on(Event.MESSAGE, this, this.onMessageReveived);         socket.on(Event.ERROR, this, this...

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

159. socket通讯返回数据 [ 88%]

...接 this.socket.connectByUrl("ws://localhost:8899"); this.socket.on(Laya.Event.OPEN, this, this.openHandler); this.socket.on(Laya.Event.MESSAGE, this, this.receiveHandler); this.socket.on(Laya.Event.CLOSE, this, this.closeHandler); this.socket.on(Laya.Event.ERROR, this, this.errorHandler); // this.s...

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

160. 为什么hitTestPoint始终是false? [ 88%]

.../bg.png"); this.s.addChild(img); this.addChild(this.s); Laya.stage.on(Laya.Event.CLICK, this, this.hitPoint); } private hitPoint(e:Laya.Event): void { console.log(this.s.hitTestPoint(e.stageX, e.stageY)); } } 很简单的代码,不知道什么hitTestPoint始终得到的是false.我打印出s的宽...

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