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

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

51. 陀螺仪接口无效呢?Gyroscope.instance.on(Event.CHANGE, this, onOrientationChange); 什么原因呢 [ 91%]

陀螺仪接口无效呢?Gyroscope.instance.on(Event.CHANGE, this, onOrientationChange); 什么原因呢 2017-10-15 1 条评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 3 个回复 game4d 赞同来自: var firstTime = true; laya....

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

52. 文本-滚动文本 [ 91%]

... txt.color = "#ffffff"; Laya.stage.addChild(txt); txt.on(Event.MOUSE_DOWN, this, startScrollText); } /* 开始滚动文本 */ function startScrollText(e) { prevX = txt.mouseX; prevY = txt.mouseY; Laya.stage.on(Event.MOUSE_MOVE, this, scrollText); Laya.stage.on(Event.MOUSE_UP, this, finishScrollText)...

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

53. 图片像素精准点击问题! [ 91%]

...mage; constructor() { // 鼠标事件 Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.onMouseDown); Laya.stage.on(Laya.Event.MOUSE_MOVE, this, this.onMouseMove); Laya.stage.on(Laya.Event.MOUSE_UP, this, this.onMouseUp, [true]); } /** 按钮动画处理 */ private hitTest(t: Laya.Image) { let s = t.s...

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

54. 鼠标交互-键盘交互 [ 91%]

...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { this.listenKeyboard(); this.createLogger(); Laya.timer.frameLoop(1, this, this.keyboardInspector); } listenKeyboard() { const Event = Laya.Event; // 用Set实现更好一些 keyDownList = []; // 添...

来源: Laya2.0_示例 发布时间: 20251209

55. video.on('complete', this, onPlayEnd);视频播完为何不触发“complete”? [ 91%]

video.on('complete', this, onPlayEnd);视频播完为何不触发“complete”? function onPlayEnd(evt:Event){ trace("video complete"); } 为何视频播完不触发呢? http://layaair.ldc.layabox.com ... Video 这里要是可以调试该多好~ 2017-01-16 添加评论 免费帖 --> 分享 微...

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

56. Laya.stage.mouseX; Laya.stage.mouseY取到的坐标用来赋给画曲线方法的起点;在左顶点正常,越往右下角起点就越偏移了 [ 91%]

...= ; constructor() { Laya.init(1600, 1400); Laya.stage.bgColor = "#000000"; this.ps = new Laya.Sprite(); Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.down2) Laya.stage.on(Laya.Event.MOUSE_UP, this, this.up2) Laya.stage.addChild(this.ps); } down2() { this.a = Laya.stage.mouseX; this.b = Laya.stage....

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

57. 鼠标交互-自定义事件 [ 91%]

...tage.height / 2; sp.size(200, 200); Laya.stage.addChild(sp); sp.on(ROTATE, this, onRotate); // 侦听自定义的事件 sp.on(Event.CLICK, this, onSpriteClick); } function onSpriteClick(e) { var randomAngle = Math.random() * 180; //发送自定义事件 sp.event(ROTATE, [randomAngle]); } // 触发...

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

58. WebSocket通信 · LayaAir3.3 · 引擎文档 · LAYABOX [ 91%]

...ROR:连接出错时触发。 示例代码: // 注册事件监听示例 this.socket.on(Laya.Event.OPEN, this, this.onSocketOpen); this.socket.on(Laya.Event.MESSAGE, this, this.onMessageReceived); this.socket.on(Laya.Event.CLOSE, this, this.onSocketClose); this.socket.on(Laya.Event.ERROR, this, th...

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

59. [LayaAirIDE3]2d相机打包后问题 [ 91%]

...ller;      onStart() {         // 初始化组件引用         this.playerScript = this.player.getComponent(Player);         this.joystickScript = this.joystick.getComponent(Joystick);         this.cameraController = this.camera.getComponent(CameraController);          // ...

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

60. LayaAirIDE_1.7.9_beta.zip was not found on this server. [ 91%]

LayaAirIDE_1.7.9_beta.zip was not found on this server. 如圖。   附件 : --> 2017-08-11 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2 个回复 cuixueying 赞同来自: 清理下浏览器缓存,重新下载一遍...

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