woso_javan 2 ヶ月 前
コミット
94888ef27b

+ 2 - 2
assets/module_storm_sunder/Script/Component/TornadoComponent.ts

@@ -96,7 +96,7 @@ export class TornadoComponent extends Component {
         this.speed = Math.round((this.speed / 2) * 100) / 100;
         // this.speed = this.speed * 2;//测试
 
-        console.log(`玩家的速度:${this.speed}`);
+        // console.log(`玩家的速度:${this.speed}`);
         this.playerInfo = {
             nickName: this.nickName,
             level: this.currentLv,
@@ -355,7 +355,7 @@ export class TornadoComponent extends Component {
 
     private updateCameraView() {
         const sence = director.getScene();
-        const view = 50 + this.currentLv * 1;
+        const view = 30 + this.currentLv * 1;
         sence.emit(EasyControllerEvent.CAMERA_ZOOM, view);
     }
 

+ 7 - 2
assets/module_storm_sunder/Script/Manager/PlayerMgr.ts

@@ -1,4 +1,4 @@
-import { assetManager, instantiate, Prefab, Node, UITransform, Vec3, Vec2, view, game, PhysicsSystem, geometry } from "cc";
+import { assetManager, instantiate, Prefab, Node, UITransform, Vec3, Vec2, view, game, PhysicsSystem, geometry, director } from "cc";
 import { ResLoader, resLoader } from "db://assets/core_tgx/base/ResLoader";
 import { StormSunderGlobalInstance } from "../StormSunderGlobalInstance";
 import { TornadoComponent } from "../Component/TornadoComponent";
@@ -6,6 +6,7 @@ import { TornadoAIComponent } from "../Component/TornadoAIComponent";
 import { AttributeBonusMgr } from "./AttributeBonusMgr";
 import { Tableai_config } from "db://assets/module_basic/table/Tableai_config";
 import { MapMgr } from "./MapMgr";
+import { EasyControllerEvent } from "db://assets/core_tgx/easy_controller/EasyController";
 
 const res = [
     "Prefabs/Storm",
@@ -252,8 +253,12 @@ export class PlayerMgr {
         return ""; // 若无有效名称,返回空字符串
     }
 
-    reset() {
+    async reset() {
         this.destroyOtherAI();
+        let tornado = await this.getTornadoNode();
+        tornado.scale = new Vec3(1, 1, 1);
+        const sence = director.getScene();
+        sence.emit(EasyControllerEvent.CAMERA_ZOOM, 30);
         this.aiIndex = 0;
     }