wgl před 6 měsíci
rodič
revize
ea5adc93d3

+ 0 - 2
ActionTowerDefense/Assets/Scripts/Characters/Character.cs

@@ -24,8 +24,6 @@ public enum CharacterState
 
     Float = 15,             //空中漂浮
 
-    Coma = 21,              //昏迷
-
     LockSoul = 25,          //在锁魂塔中
     Conduct = 26,           //在指挥中
 }

+ 0 - 25
ActionTowerDefense/Assets/Scripts/Characters/Demonic.cs

@@ -438,13 +438,6 @@ public class Demonic : MoveCharacter
 
                 rb.velocity = velocity;
                 break;
-            case CharacterState.Coma:
-                pastComaTime += Time.deltaTime;
-                if (pastComaTime >= comaTime)
-                {
-                    ChangeState(CharacterState.Idle);
-                }
-                break;
             case CharacterState.Attack:
                 attackController.attackTime -= Time.deltaTime;
                 attackController.attackKeyCount += Time.deltaTime;
@@ -590,11 +583,6 @@ public class Demonic : MoveCharacter
             case CharacterState.Fall:
                 rb.velocity = Vector3.zero;
                 break;
-            //case CharacterState.Hurt:
-            //    break;
-            case CharacterState.Coma:
-                canMove = true;
-                break;
             case CharacterState.Attack:
                 if (attackController.effect)
                 {
@@ -633,19 +621,6 @@ public class Demonic : MoveCharacter
                 ani.Play("fall", 0, 0);
                 //animalAni.SetInteger("state", (int)PlayerState.Fall);
                 break;
-            //case CharacterState.Hurt:
-            //    ani.Play("hitted", 0, 0);
-            //    aniCollider.Play("Hurt", 0, 0);
-            //    invincibleTime = totalInvincibleTime;
-            //    hurtKeepTime = minHurtKeepTime;
-            //    //ani.Play("Invincible", 2, 0);
-            //    break;
-            case CharacterState.Coma:
-                //ani.Play("Coma", 0, 0);
-                ani.Play("idle", 0, 0);
-                pastComaTime = 0;
-                rb.velocity = Vector3.zero;
-                break;
             case CharacterState.Attack:
                 break;
             case CharacterState.Die:

+ 1 - 45
ActionTowerDefense/Assets/Scripts/Characters/Enemy.cs

@@ -46,11 +46,6 @@ public class Enemy : MoveCharacter
     public float reboundYSpeed;
     public int wallDamage;
 
-    [Header("ÂäľŘŃŁÔÎ")]
-    public bool willBeComa;
-    public float willComaTime;
-    public int comaDamage;
-
     [Header("ľĐˇ˝Ó˘Áé")]
     public Spirits.SpiritType type;
 
@@ -352,15 +347,7 @@ public class Enemy : MoveCharacter
             case CharacterState.Fall:
                 if (foot.TrigGround || canFly)
                 {
-                    if (willBeComa)
-                    {
-                        comaTime = willComaTime;
-                        ChangeState(CharacterState.Coma);
-                    }
-                    else
-                    {
-                        ChangeState(CharacterState.Idle);
-                    }
+                    ChangeState(CharacterState.Idle);
                     break;
                 }
                 Vector3 velocity = rb.velocity;
@@ -412,13 +399,6 @@ public class Enemy : MoveCharacter
                     break;
                 }
                 break;
-            case CharacterState.Coma:
-                pastComaTime += Time.deltaTime;
-                if (pastComaTime >= comaTime)
-                {
-                    ChangeState(CharacterState.Idle);
-                }
-                break;
             case CharacterState.SpecialStatus:
                 attributeStatus.SpecialStateEffect();
                 break;
@@ -462,15 +442,6 @@ public class Enemy : MoveCharacter
             case CharacterState.Float:
                 canMove = true;
                 break;
-            case CharacterState.Coma:
-                ani.Play("idle", 0, 0);
-                if (canFly)
-                {
-                    rb.constraints = RigidbodyConstraints.FreezeRotation | RigidbodyConstraints.FreezePositionZ | RigidbodyConstraints.FreezePositionY;
-                    rb.useGravity = false;
-                }
-                canMove = true;
-                break;
             default:
                 break;
         }
@@ -493,21 +464,6 @@ public class Enemy : MoveCharacter
             case CharacterState.Float:
                 canMove = false;
                 break;
-            case CharacterState.Coma:
-                if (willBeComa)
-                {
-                    BeHit(comaDamage);
-                }
-                //ani.Play("Coma", 0, 0);
-                ani.Play("weak", 0, 0);
-                rb.velocity = Vector3.zero;
-                pastComaTime = 0;
-                if (canFly)
-                {
-                    rb.constraints = RigidbodyConstraints.FreezeRotation | RigidbodyConstraints.FreezePositionZ;
-                    rb.useGravity = true;
-                }
-                break;
             case CharacterState.Attack:
                 break;
             case CharacterState.Die:

+ 0 - 45
ActionTowerDefense/Assets/Scripts/Characters/PlayerController.cs

@@ -1234,33 +1234,6 @@ public class PlayerController : MoveCharacter
                 }
                 rb.velocity = AirMove(rb.velocity);
                 break;
-            //case CharacterState.Hurt:
-            //    if (hurtKeepTime <= 0 && rb.velocity.magnitude < hurtChangeVelocity)
-            //    {
-            //        if (CheckPlayerChangeState())
-            //        {
-            //            break;
-            //        }
-            //    }
-            //    Vector3 vel = rb.velocity;
-            //    if (!foot.TrigGround)
-            //    {
-            //        if (canfly)
-            //        {
-            //            vel.y = vel.y * (1 - decelerationRatio * Time.deltaTime);
-            //        }
-            //        else
-            //        {
-            //            vel += Vector3.up * extraFallGravity * Time.deltaTime;
-            //        }
-
-            //    }
-            //    vel.x = vel.x * (1 - decelerationRatio * Time.deltaTime);
-            //    rb.velocity = vel;
-            //    CachedPlayerInput();
-            //    break;
-            case CharacterState.Coma:
-                break;
             case CharacterState.Attack:
                 if (attackController.attackTime <= 0)
                 {
@@ -1696,11 +1669,6 @@ public class PlayerController : MoveCharacter
                 break;
             case CharacterState.Fall:
                 break;
-            //case CharacterState.Hurt:
-            //    break;
-            case CharacterState.Coma:
-                canMove = true;
-                break;
             case CharacterState.Attack:
                 aniCollider.Play("NotAttack", 1, 0);
                 break;
@@ -1778,19 +1746,6 @@ public class PlayerController : MoveCharacter
                 ani.Play("fall", 0, 0);
                 //animalAni.SetInteger("state", (int)PlayerState.Fall);
                 break;
-            //case CharacterState.Hurt:
-            //    aniCollider.Play("Hurt", 0, 0);
-            //    ani.Play("hitted", 0, 0);
-            //    invincibleTime = totalInvincibleTime;
-            //    hurtKeepTime = minHurtKeepTime;
-            //    //ani.Play("Invincible", 2, 0);
-            //    break;
-            case CharacterState.Coma:
-                //ani.Play("Coma", 0, 0);
-                ani.Play("idle", 0, 0);
-                aniCollider.Play("Idle", 0, 0);
-                rb.velocity = Vector3.zero;
-                break;
             case CharacterState.Attack:
                 attackController.attackTime = totalAttack_summonTime;
                 break;

+ 4 - 3
ActionTowerDefense/Assets/Scripts/Conduct/Mountain.cs

@@ -26,9 +26,10 @@ public class Mountain : MonoBehaviour
         if (beHitTrigger && beHitTrigger.owner.tag == "Enemy")
         {
             Enemy en = other.GetComponentInParent<Enemy>();
-            en.willComaTime = comaTime;
-            en.willBeComa = true;
-            en.comaDamage = demonicNum * damage;
+            //报错了先注释掉,之后改
+            //en.willComaTime = comaTime;
+            //en.willBeComa = true;
+            //en.comaDamage = demonicNum * damage;
             en.ChangeState(CharacterState.Fall);
         }
     }

+ 4 - 2
ActionTowerDefense/Assets/Scripts/Conduct/WavePowerSkill.cs

@@ -127,7 +127,8 @@ public class WavePowerSkill : MonoBehaviour
                     else
                     {
                         singleTarget.comaTime = continueTime + moreComaTime;
-                        singleTarget.ChangeState(CharacterState.Coma);
+                        //报错了先注释掉,之后改
+                        //singleTarget.ChangeState(CharacterState.Coma);
                         singleTarget.transform.position -= new Vector3(longFX * longSpeed * Time.deltaTime, 0, 0);
                         curHitTime += Time.deltaTime;
                         if (curHitTime >= hitIntervalTime)
@@ -145,7 +146,8 @@ public class WavePowerSkill : MonoBehaviour
                     if (!ene.isDie)
                     {
                         ene.comaTime = continueTime + moreComaTime;
-                        ene.ChangeState(CharacterState.Coma);
+                        //报错了先注释掉,之后改
+                        //ene.ChangeState(CharacterState.Coma);
                         ene.transform.position -= new Vector3(longSpeed * Time.deltaTime, 0, 0);
                         curHitTime += Time.deltaTime;
                         if (curHitTime >= hitIntervalTime)