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

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

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_示例 发布时间: 20240929

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_示例 发布时间: 20240929

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_示例 发布时间: 20240929

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

59. 鼠标事件out ,move 发生再up事件之后 [ 91%]

...p事件之后 一个页面,绑定事件  initEvent() {         this.bubbleView.on(Laya.Event.MOUSE_MOVE, thisthis.mouseMoveCallback);         this.bubbleView.on(Laya.Event.MOUSE_UP, thisthis.mouseUpCallback);         this.bubbleView.on(Laya.Event.MOUSE_OUT, this,...

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

60. 文本-自动调整文本尺寸 [ 91%]

...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.setup(); } setup() { const Text = Laya.Text; // 该文本自动适应尺寸 var autoSizeText = this.createSampleText(); autoSizeText.overflow = Text.VISIBLE; autoSizeText.y = 50; // 该文本被限制了宽度 var widthL...

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