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

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

1. 输入设备-摇一摇 [ 100%]

...e = Laya.Shake; Shake.instance.start(5, 500); Shake.instance.on(Laya.Event.CHANGE, this, this.onShake); console.text = '开始接收设备摇动\n'; } onShake() { const Shake = Laya.Shake; shakeCount++; console.text += "设备摇晃了" + shakeCount + "次\n"; if (shakeCount >= 3) { Shake.instance.s...

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

2. 输入设备-指南针 [ 87%]

...示角度的文本 this.createDegreesText(); Gyroscope.instance.on(Event.CHANGE, this, this.onOrientationChange); } // 方位指示器指向当前所朝方位 createCompass() { const Sprite = Laya.Sprite; compassImg = new Sprite(); Laya.stage.addChild(compassImg); compassImg.loadImage(compassImgPath...

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