zenghaowei 3 年之前
父節點
當前提交
b52c6c4be0

+ 4 - 0
assets/Script/game/gamePlot/plot_1_1/Step1.ts

@@ -18,6 +18,10 @@ export default class Step1 extends cc.Component {
         EventListener.on("Step1", this.npcJump, this);
     }
 
+    onDestroy() {
+        EventListener.off("Step1", this.npcJump, this);
+    }
+
     start() {
         if (this.npc_1) {
             this.npc_1.active = false;

+ 5 - 0
assets/Script/game/gamePlot/plot_1_1/Step2.ts

@@ -20,6 +20,11 @@ export default class Step2 extends cc.Component {
         EventListener.on("step_2_2", this.dialog2, this);
     }
 
+    onDestroy() {
+        EventListener.off("step_2_1", this.dialog1, this);
+        EventListener.off("step_2_2", this.dialog2, this);
+    }
+
     dialog1() {
         let npc = this.ncp_1.getComponent(FDialogNoneNPC);
         npc.dialog1();

File diff suppressed because it is too large
+ 1514 - 1679
assets/resources/prefab/map/map1.prefab