zenghaowei 3 лет назад
Родитель
Сommit
081892c764

+ 5 - 3
assets/Script/game/fight/evnet/FFenceTrigger.ts

@@ -170,7 +170,8 @@ export default class FFenceTrigger extends BaseEvent {
         for (let i = 0; i < this.mFenceTrigger.length; i++) {
             const element = this.mFenceTrigger[i];
             element.active = true;
-
+            element.getComponent(cc.PhysicsBoxCollider).enabled = true;
+            element.zIndex = 0;
             let nodes = element.children;
             nodes.forEach(tmp => {
                 let spine = tmp.getComponent(sp.Skeleton);
@@ -180,7 +181,7 @@ export default class FFenceTrigger extends BaseEvent {
             });
         }
 
-        this.moveCamera(this.node.getPosition(),1, () => {
+        this.moveCamera(this.node.getPosition(), 1, () => {
             this.dialog(0);
         })
     }
@@ -429,7 +430,7 @@ export default class FFenceTrigger extends BaseEvent {
         //检查其它开关是否打开
         if (!this.mFenceTrigger2.length) return
         this.ff.pauseSprite(true);
-        this.moveCamera(this.mFenceTrigger2[0].getPosition(),1, () => {
+        this.moveCamera(this.mFenceTrigger2[0].getPosition(), 1, () => {
             cc.tween(this.node).sequence(
                 cc.callFunc(() => {
                     for (let i = 0; i < this.mFenceTrigger2.length; i++) {
@@ -442,6 +443,7 @@ export default class FFenceTrigger extends BaseEvent {
                     for (let i = 0; i < this.mFenceTrigger2.length; i++) {
                         const element = this.mFenceTrigger2[i];
                         element.getComponent(cc.PhysicsBoxCollider).enabled = false;
+                        element.zIndex = -9999;
                     }
                     this.ff.pauseSprite(false);
 

+ 3 - 2
assets/Script/game/fight/evnet/altar/FAltarGear.ts

@@ -65,11 +65,12 @@ export default class FAltarGear extends cc.Component {
             this.mFenceTrigger.forEach(element => {
                 let spine = element.children[0].getComponent(sp.Skeleton);
                 if (spine) {
+                    spine.setAnimation(0, SpineName.OPEN, false);
                     spine.setCompleteListener(() => {
+                        spine.setCompleteListener(null);
                         element.zIndex = -9999;
                         element.getComponent(cc.PhysicsBoxCollider).enabled = false;
-                    });
-                    spine.setAnimation(0, SpineName.OPEN, false);
+                    })
                 }
             });
         });

Разница между файлами не показана из-за своего большого размера
+ 1585 - 1067
assets/resources/prefab/map/map1.prefab