zenghaowei 3 rokov pred
rodič
commit
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();

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1514 - 1679
assets/resources/prefab/map/map1.prefab