大约有 84 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0055 秒)
...ge.mouseY, p); this.layer.getScreenPositionByTilePos(Math.floor(p.x), Math.floor(p.y), p); this.sprite.pos(p.x, p.y); } private mapLoaded(): void { this.layer = this.tiledMap.getLayerByIndex(0); var radiusX...
来源: Laya_社区 发布时间: 20201230
... rotationInfo:RotationInfo):void { info.text = "alpha:" + Math.floor(rotationInfo.alpha) + '\n' + "beta :" + Math.floor(rotationInfo.beta) + '\n' + "gamma:" + Math.floor(rotationInfo.gamma); } ``` ## 2、加速计 `Accelerator`类定期发送设备的运动传感器检...
来源: Laya2.0_文档 发布时间: 20210714
... rotationInfo: Laya.RotationInfo): void { this.info.text = "alpha:" + Math.floor(rotationInfo.alpha) + '\n' + "beta :" + Math.floor(rotationInfo.beta) + '\n' + "gamma:" + Math.floor(rotationInfo.gamma); } } new Gyroscope_Sample(); 2、加速计 Accelerator类定期发送设备的运动传感器...
来源: Laya3.0_文档 发布时间: 20251010
... rotationInfo: Laya.RotationInfo): void { this.info.text = "alpha:" + Math.floor(rotationInfo.alpha) + '\n' + "beta :" + Math.floor(rotationInfo.beta) + '\n' + "gamma:" + Math.floor(rotationInfo.gamma); } } new Gyroscope_Sample(); ``` ## 2、加速计 `Accelerator`类定期发送设备的运动...
来源: Laya2.0_文档 发布时间: 20210715
...ap.ORIENTATION_STAGGERED: tileX = Math.floor(tileX); tileY = Math.floor(tileY); screenPos.x = tileX * this._map.tileWidth + (tileY & 1) * this._tileWidthHalf; ...
来源: Laya_社区 发布时间: 20220627
..._path_radians = Math.PI / 180 * this._path_angle ; this._tail_pos.x = Math.floor( this._head_pos.x + this._path_length * Math.cos( this._path_radians ) ); this._tail_pos.y = Math.floor( this._head_pos.y + this._path_length * Math.sin( this._path_radians ) ); // // 确保路径的终点不能超出...
来源: Laya_社区 发布时间: 20180515
...c.y - CacheStyle.CANVAS_EXTEND_EDGE; tRec.x = Math.floor(tRec.x + x) - x; tRec.y = Math.floor(tRec.y + y) - y; tRec.width = Math.floor(tRec.width); tRec.height = Math.floor(tRec.height); ...
来源: Laya_社区 发布时间: 20210615
... result = { r: -1, g: -1, b: -1 }; result.b = color % 256; result.g = Math.floor((color / 256)) % 256; result.r = Math.floor((color / 256) / 256); return result; } let result = spliceColor(color); let lastResult = spliceColor(lastColor); let colorMatrix = [ 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, ...
来源: Laya_社区 发布时间: 20180930
...ion () { /** * 游戏入口 */ function RunGame(){ this.bg = null; this.mapFloor = null; this.player = null; this.flyEnergy = null; this.speedEnergy = null; RunGame.__super.call(this); this.init(); } //RunGame 是一个显示对象 继承此 Sprite Laya.class(RunGame,"RunGame", laya.display.Sprite);...
来源: Laya_社区 发布时间: 20160803
...(二连跳) 3、玩家悬浮 在之前的教程中 我们有写到Floor.js Player.js MapFloor.js RunGame.js 本节 会在之前的基础上进行细微修改 认真看哈~~ 为了方便测试代码 我们首先要将地板的运动关闭 不然地板一直在动 不太适合我们调试代码...
来源: Laya_社区 发布时间: 20160801