{
  "code": "var Vector3 = Laya.Vector3;\r\nexport class Runner extends Laya.Script3D {\r\n    constructor() {\r\n        super();\r\n        this.currotV = new Vector3();\r\n        this.currot = new Laya.Quaternion;\r\n        this.NormalizeSpeed = new Vector3();\r\n        this.turndir = new Vector3(1, 0, 0);\r\n    }\r\n    static get Instance() {\r\n        if (Runner.ins) {\r\n            return Runner.ins;\r\n        }\r\n        else {\r\n            return new Runner();\r\n        }\r\n    }\r\n    onAwake() {\r\n        this.m_player = this.owner;\r\n    }\r\n    onUpdate() {\r\n    }\r\n    MoveX(_speed) {\r\n        _speed *= 0.07;\r\n        this.m_player.transform.translate(new Vector3(_speed, 0, 0));\r\n        this.m_player.transform.position = this.m_player.transform.position.x < -4.5 ? new Vector3(-4.5, this.m_player.transform.position.y, this.m_player.transform.position.z) : this.m_player.transform.position;\r\n        this.m_player.transform.position = this.m_player.transform.position.x > 4.5 ? new Vector3(4.5, this.m_player.transform.position.y, this.m_player.transform.position.z) : this.m_player.transform.position;\r\n    }\r\n    TurnDir(_dir) {\r\n        if (_dir.x != 0) {\r\n            Vector3.lerp(this.currotV, _dir, 0.35, _dir);\r\n            this.currotV = _dir;\r\n            Laya.Quaternion.rotationLookAt(_dir, new Vector3(0, 1, 0), this.currot);\r\n            Laya.Quaternion.slerp(this.m_player.transform.rotation, this.currot, 0.025, this.currot);\r\n            this.currot = new Laya.Quaternion(0, this.currot.y, 0);\r\n            this.m_player.transform.rotation = this.currot;\r\n        }\r\n        else {\r\n            Laya.Quaternion.slerp(this.m_player.transform.rotation, new Laya.Quaternion(0, 0, 0, 0), 0.1, this.currot);\r\n            this.currot = new Laya.Quaternion(0, this.currot.y, 0);\r\n            this.m_player.transform.rotation = this.currot;\r\n        }\r\n    }\r\n}\r\n//# sourceMappingURL=Runner.js.map",
  "references": [],
  "map": "{\"version\":3,\"file\":\"Runner.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../src/Game/Runner.ts\"],\"names\":[],\"mappings\":\"AAAA,IAAO,OA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