Sfoglia il codice sorgente

修复bug,修改战斗

FantasyUFG 5 anni fa
parent
commit
a562c7da3c

File diff suppressed because it is too large
+ 144 - 246
assets/scene/Game.fire


+ 10 - 10
assets/script/Game/Ai/AiCharactor.js

@@ -47,7 +47,7 @@ cc.Class({
         else if (bLeft == 2) {
 
 
-            this.armatureDisplay.node.scaleX = -1;
+            this.armatureDisplay.node.scaleX = 1;
             this.armature.animation.play("double_hit", 1);
             this.node.emit("attack_critical_strike1");
 
@@ -57,7 +57,7 @@ cc.Class({
         else if (bLeft == 3) {
 
 
-            this.armatureDisplay.node.scaleX = 1;
+            this.armatureDisplay.node.scaleX = -1;
             this.armature.animation.play("double_hit", 1);
             this.node.emit("attack_critical_strike2");
 
@@ -67,7 +67,7 @@ cc.Class({
         else if (bLeft == 4) {
 
 
-            this.armatureDisplay.node.scaleX = -1;
+            this.armatureDisplay.node.scaleX = 1;
             this.armature.animation.play("critical_strike", 1);
             this.node.emit("attack_double_hit1");
 
@@ -75,7 +75,7 @@ cc.Class({
         //连击
         else if (bLeft == 5) {
 
-            this.armatureDisplay.node.scaleX = 1;
+            this.armatureDisplay.node.scaleX = -1;
             this.armature.animation.play("critical_strike", 1);
             this.node.emit("attack_double_hit2");
 
@@ -157,7 +157,7 @@ cc.Class({
             if (event.animationState.name === "right_fit" || event.animationState.name === "left_fit") {
                 console.log("attack 动作播放完毕!!!");
                 //TODO:
-                //this.armatureDisplay.node.scaleX = 0.39;
+                this.armatureDisplay.node.scaleX = 1;
                 this.armature.animation.play("idle", 0);
 
                 this.aicontroScp._RightJayShow = false;
@@ -178,7 +178,7 @@ cc.Class({
             if (event.animationState.name === "double_hit") {
                 console.log("critical_strike 动作播放完毕!!!");
                 //TODO:
-                //this.armatureDisplay.node.scaleX = 0.39;
+                this.armatureDisplay.node.scaleX = 1;
                 this.armature.animation.play("idle", 0);
 
                 this.aicontroScp._CriticalStrike = false;
@@ -188,7 +188,7 @@ cc.Class({
             if (event.animationState.name === "critical_strike") {
                 console.log("double-hit 动作播放完毕!!!");
                 //TODO:
-                //this.armatureDisplay.node.scaleX = 0.39;
+                this.armatureDisplay.node.scaleX = 1;
                 this.armature.animation.play("idle", 0);
                 this.aicontroScp._DoubleHit = false;
                 this.aicontroScp._Statepassivity = false;
@@ -196,7 +196,7 @@ cc.Class({
             if (event.animationState.name === "dodge") {
                 console.log("dodge 动作播放完毕!!!");
                 //TODO:
-                //this.armatureDisplay.node.scaleX = 0.39;
+                this.armatureDisplay.node.scaleX = 1;
                 this.armature.animation.play("idle", 0);
 
                 this.aicontroScp._RightDodge = false;
@@ -206,7 +206,7 @@ cc.Class({
             if (event.animationState.name === "block") {
                 console.log("block 动作播放完毕!!!");
                 //TODO:
-                // this.armatureDisplay.node.scaleX = 0.39;
+                this.armatureDisplay.node.scaleX = 1;
 
                 this.armature.animation.play("idle", 0);
 
@@ -217,7 +217,7 @@ cc.Class({
                 event.animationState.name === "be_double_hit" || event.animationState.name === "be_beaten_right") {
                 console.log("be_beaten 动作播放完毕!!!");
                 //TODO:
-                // this.armatureDisplay.node.scaleX = 0.39;
+                this.armatureDisplay.node.scaleX = 1;
 
                 this.armature.animation.play("idle", 0);
 

+ 18 - 12
assets/script/Game/Ai/AiPlayerController.js

@@ -126,10 +126,11 @@ cc.Class({
                 if (randomnum_2 == 1) {
                     //暴击
                     this._CriticalStrike = true;
-                    this.UiController.Ui_Shake(1);
+
                     this.scheduleOnce(function() {
                         this.ctorScp.attack(2);
-                    }, 1.8);
+                    }, 0.8);
+                    this.UiController.Ui_Shake(1);
                     // this.AiControScp.ondefense_Ai(1, 1); //左右拳,击打类型
                     if (!this.PlayerControScp._RightDodge && !this.PlayerControScp._Defence) {
                         this.PlayerControScp._BeCriticalStrike = true;
@@ -140,10 +141,11 @@ cc.Class({
                 if (randomnum_2 == 2) {
                     //连击
                     this._DoubleHit = true;
-                    this.UiController.Ui_Shake(1);
+
                     this.scheduleOnce(function() {
                         this.ctorScp.attack(4);
-                    }, 1.8);
+                    }, 0.8);
+                    this.UiController.Ui_Shake(1);
                     //this.AiControScp.ondefense_Ai(1, 2); //左右拳,击打类型
                     if (!this.PlayerControScp._RightDodge && !this.PlayerControScp._Defence) {
                         this.PlayerControScp._BeDoubleHit = true;
@@ -152,10 +154,11 @@ cc.Class({
                 }
             } else { //普攻状态 普攻动作
                 this._RightJayShow = true;
-                this.UiController.Ui_Shake(1);
+
                 this.scheduleOnce(function() {
                     this.ctorScp.attack(0);
-                }, 1.8);
+                }, 0.8);
+                this.UiController.Ui_Shake(1);
                 //this.AiControScp.ondefense_Ai(1, 0); //左右拳,击打类型
                 if (!this.PlayerControScp._RightDodge && !this.PlayerControScp._Defence) {
                     this.PlayerControScp._Hurt = true;
@@ -172,29 +175,32 @@ cc.Class({
                 if (randomnum_2 == 1) {
                     //暴击
                     this._CriticalStrike = true;
-                    this.UiController.Ui_Shake(2);
+
                     this.scheduleOnce(function() {
                         this.ctorScp.attack(2);
-                    }, 1.8);
+                    }, 0.8);
+                    this.UiController.Ui_Shake(2);
                     //this.AiControScp.ondefense_Ai(1, 1); //左右拳,击打类型
                     this.playerctorScp.hurt(1, 1); //右暴击
                 }
                 if (randomnum_2 == 2) {
                     //连击
                     this._DoubleHit = true;
-                    this.UiController.Ui_Shake(2);
+
                     this.scheduleOnce(function() {
                         this.ctorScp.attack(4);
-                    }, 1.8);
+                    }, 0.8);
+                    this.UiController.Ui_Shake(2);
                     //this.AiControScp.ondefense_Ai(1, 2); //左右拳,击打类型
                     this.playerctorScp.hurt(1, 2); //右连击
                 }
             } else { //普攻状态 普攻动作
                 this._RightJayShow = true;
-                this.UiController.Ui_Shake(2);
+
                 this.scheduleOnce(function() {
                     this.ctorScp.attack(1);
-                }, 1.8);
+                }, 0.8);
+                this.UiController.Ui_Shake(2);
                 //this.AiControScp.ondefense_Ai(1, 0); //左右拳,击打类型
                 if (!this.PlayerControScp._LeftDodg && !this.PlayerControScp._Defence) {
                     this.PlayerControScp._Hurt = true;

+ 28 - 28
assets/script/Game/Player/Charactor.js

@@ -23,13 +23,13 @@ cc.Class({
         //发射攻击事件  // 普攻
         if (bLeft == 0) {
             //右拳
-            this.armatureDisplay.node.scaleX = 0.39;
-            this.armature.animation.play("right_hit", 1);
+            // this.armatureDisplay.node.scaleX = 0.39;
+            this.armature.animation.play("left_fit", 1);
             this.node.emit("attack");
         } else if (bLeft == 1) {
             //左拳
-            this.armatureDisplay.node.scaleX = 0.39;
-            this.armature.animation.play("left_fit", 1);
+            // this.armatureDisplay.node.scaleX = 0.39;
+            this.armature.animation.play("right_fit", 1);
             this.node.emit("attack");
         }
         //暴击右
@@ -77,11 +77,11 @@ cc.Class({
             if (bLeft == 0) {
                 //左挨打
                 // this.armatureDisplay.node.scaleX = 0.39;
-                this.armature.animation.play("be_beaten_left", 1);
+                //this.armature.animation.play("be_beaten_right", 1);
             } else if (bLeft == 1) {
                 //右挨打
                 // this.armatureDisplay.node.scaleX = -0.39;
-                this.armature.animation.play("be_beaten_right", 1);
+                //this.armature.animation.play("be_beaten_left", 1);
             }
             this.node.emit("hurt_ord");
         }
@@ -90,14 +90,14 @@ cc.Class({
             if (bLeft == 0) {
                 //左挨打
                 //被暴打
-                this.armatureDisplay.node.scaleX = -0.39;
-                this.armature.animation.play("be_double_hit", 1);
+                // this.armatureDisplay.node.scaleX = -0.39;
+                // this.armature.animation.play("be_double_hit", 1);
 
             } else if (bLeft == 1) {
                 //被暴打
                 //右挨打
-                this.armatureDisplay.node.scaleX = 0.39;
-                this.armature.animation.play("be_double_hit", 1);
+                // this.armatureDisplay.node.scaleX = 0.39;
+                //  this.armature.animation.play("be_double_hit", 1);
             }
             this.node.emit("hurt_critical");
         }
@@ -107,13 +107,13 @@ cc.Class({
 
                 //被连击打
                 //左挨打
-                this.armatureDisplay.node.scaleX = -0.39;
-                this.armature.animation.play("be_critical_strike", 1);
+                //  this.armatureDisplay.node.scaleX = -0.39;
+                // this.armature.animation.play("be_critical_strike", 1);
             } else if (bLeft == 1) {
                 //被连击打
                 //右挨打
-                this.armatureDisplay.node.scaleX = 0.39;
-                this.armature.animation.play("be_critical_strike", 1);
+                //  this.armatureDisplay.node.scaleX = 0.39;
+                //  this.armature.animation.play("be_critical_strike", 1);
             }
             this.node.emit("hurt_double");
         }
@@ -132,8 +132,8 @@ cc.Class({
             if (event.animationState.name === "left_fit") {
                 console.log("attack 动作播放完毕!!!");
                 //TODO:
-                //this.armatureDisplay.node.scaleX = 0.39;
-                this.armature.animation.play("idel", 0);
+                this.armatureDisplay.node.scaleX = 0.39;
+                this.armature.animation.play("idle", 0);
 
                 this.controScp._RightJayShow = false;
                 this.controScp._LeftJayShow = false;
@@ -142,8 +142,8 @@ cc.Class({
             if (event.animationState.name === "right_hit") {
                 console.log("attack 动作播放完毕!!!");
                 //TODO:
-                //this.armatureDisplay.node.scaleX = 0.39;
-                this.armature.animation.play("idel", 0);
+                this.armatureDisplay.node.scaleX = 0.39;
+                this.armature.animation.play("idle", 0);
 
                 this.controScp._RightJayShow = false;
                 this.controScp._LeftJayShow = false;
@@ -152,7 +152,7 @@ cc.Class({
             if (event.animationState.name === "double_hit") {
                 console.log("critical_strike 动作播放完毕!!!");
                 //TODO:
-                //this.armatureDisplay.node.scaleX = 0.39;
+                this.armatureDisplay.node.scaleX = 0.39;
                 this.armature.animation.play("idle", 0);
 
                 this.controScp._CriticalStrike = false;
@@ -162,8 +162,8 @@ cc.Class({
             if (event.animationState.name === "critical_strike") {
                 console.log("critical_strike 动作播放完毕!!!");
                 //TODO:
-                //this.armatureDisplay.node.scaleX = 0.39;
-                this.armature.animation.play("idel", 0);
+                this.armatureDisplay.node.scaleX = 0.39;
+                this.armature.animation.play("idle", 0);
 
                 this.controScp._CriticalStrike = false;
                 this.aicontroScp._Statepassivity = false;
@@ -171,16 +171,16 @@ cc.Class({
             if (event.animationState.name === "be_beaten_left" || event.animationState.name === "be_beaten_right") {
                 console.log("double-hit 动作播放完毕!!!");
                 //TODO:
-                //this.armatureDisplay.node.scaleX = 0.39;
-                this.armature.animation.play("idel", 0);
+                this.armatureDisplay.node.scaleX = 0.39;
+                this.armature.animation.play("idle", 0);
                 this.controScp._DoubleHit = false;
                 this.aicontroScp._Statepassivity = false;
             }
             if (event.animationState.name === "dodge") {
                 console.log("dodge 动作播放完毕!!!");
                 //TODO:
-                //this.armatureDisplay.node.scaleX = 0.39;
-                this.armature.animation.play("idel", 0);
+                this.armatureDisplay.node.scaleX = 0.39;
+                this.armature.animation.play("idle", 0);
 
                 this.controScp._RightDodge = false;
                 this.controScp._LeftDodg = false;
@@ -189,9 +189,9 @@ cc.Class({
             if (event.animationState.name === "block") {
                 console.log("block 动作播放完毕!!!");
                 //TODO:
-                // this.armatureDisplay.node.scaleX = 0.39;
+                this.armatureDisplay.node.scaleX = 0.39;
 
-                this.armature.animation.play("idel", 0);
+                this.armature.animation.play("idle", 0);
 
                 this.controScp._Defence = false;
             }
@@ -199,7 +199,7 @@ cc.Class({
                 event.animationState.name === "be_double_hit" || event.animationState.name === "be_beaten_right") {
                 console.log("be_beaten 动作播放完毕!!!");
                 //TODO:
-                // this.armatureDisplay.node.scaleX = 0.39;
+                this.armatureDisplay.node.scaleX = 0.39;
 
                 this.armature.animation.play("idle", 0);
 

Some files were not shown because too many files changed in this diff