|
@@ -14,6 +14,7 @@ import { TimerMgr } from './Manager/TimerMgr';
|
|
|
import { LevelManager } from './Manager/LevelMgr';
|
|
|
import { CAMERA_SPLIT_DURATION } from './Components/BulletComponent';
|
|
|
import { AliensAudioMgr } from './Manager/AliensAudioMgr';
|
|
|
+import { UserManager } from './Manager/UserMgr';
|
|
|
|
|
|
const { ccclass, property } = _decorator;
|
|
|
//动画时长
|
|
@@ -117,7 +118,9 @@ export class LevelAction extends Component {
|
|
|
if (this._isZoomed) return;
|
|
|
|
|
|
// 获取相机前方方向(世界坐标)
|
|
|
- const forward = new Vec3(0, 0, -1);
|
|
|
+ const magnifyRate = UserManager.instance.userModel.magnifyRate;
|
|
|
+ console.log('magnifyRate:', magnifyRate);
|
|
|
+ const forward = new Vec3(0, 0, -magnifyRate);
|
|
|
Vec3.transformQuat(forward, forward, this.camera.node.rotation);
|
|
|
// 朝前方移动(拉近)
|
|
|
Vec3.scaleAndAdd(this.camera.node.position, this._initialPosition, forward, this.zoomDistance);
|