Browse Source

第一关

zenghaowei 3 years ago
parent
commit
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++) {
         for (let i = 0; i < this.mFenceTrigger.length; i++) {
             const element = this.mFenceTrigger[i];
             const element = this.mFenceTrigger[i];
             element.active = true;
             element.active = true;
-
+            element.getComponent(cc.PhysicsBoxCollider).enabled = true;
+            element.zIndex = 0;
             let nodes = element.children;
             let nodes = element.children;
             nodes.forEach(tmp => {
             nodes.forEach(tmp => {
                 let spine = tmp.getComponent(sp.Skeleton);
                 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);
             this.dialog(0);
         })
         })
     }
     }
@@ -429,7 +430,7 @@ export default class FFenceTrigger extends BaseEvent {
         //检查其它开关是否打开
         //检查其它开关是否打开
         if (!this.mFenceTrigger2.length) return
         if (!this.mFenceTrigger2.length) return
         this.ff.pauseSprite(true);
         this.ff.pauseSprite(true);
-        this.moveCamera(this.mFenceTrigger2[0].getPosition(),1, () => {
+        this.moveCamera(this.mFenceTrigger2[0].getPosition(), 1, () => {
             cc.tween(this.node).sequence(
             cc.tween(this.node).sequence(
                 cc.callFunc(() => {
                 cc.callFunc(() => {
                     for (let i = 0; i < this.mFenceTrigger2.length; i++) {
                     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++) {
                     for (let i = 0; i < this.mFenceTrigger2.length; i++) {
                         const element = this.mFenceTrigger2[i];
                         const element = this.mFenceTrigger2[i];
                         element.getComponent(cc.PhysicsBoxCollider).enabled = false;
                         element.getComponent(cc.PhysicsBoxCollider).enabled = false;
+                        element.zIndex = -9999;
                     }
                     }
                     this.ff.pauseSprite(false);
                     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 => {
             this.mFenceTrigger.forEach(element => {
                 let spine = element.children[0].getComponent(sp.Skeleton);
                 let spine = element.children[0].getComponent(sp.Skeleton);
                 if (spine) {
                 if (spine) {
+                    spine.setAnimation(0, SpineName.OPEN, false);
                     spine.setCompleteListener(() => {
                     spine.setCompleteListener(() => {
+                        spine.setCompleteListener(null);
                         element.zIndex = -9999;
                         element.zIndex = -9999;
                         element.getComponent(cc.PhysicsBoxCollider).enabled = false;
                         element.getComponent(cc.PhysicsBoxCollider).enabled = false;
-                    });
-                    spine.setAnimation(0, SpineName.OPEN, false);
+                    })
                 }
                 }
             });
             });
         });
         });

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