wgl 6 tháng trước cách đây
mục cha
commit
217273ba58

+ 2 - 15
ActionTowerDefense/Assets/Scripts/Bullet.cs

@@ -154,19 +154,6 @@ public class Bullet : MonoBehaviour
                 trigedObjs.Add(hitTrigger);
                 if (Util.CheckCanHit(owner.tag, hitTrigger.owner.tag) && !hitTrigger.owner.isDie)
                 {
-                    //计算护甲减免
-                    int curDamage = owner.attackController.attackInfo.damage;
-                    int am = hitTrigger.owner.armor;
-                    if (am > 0)
-                    {
-                        int ap = owner.attackController.armorPiercing;
-                        int c = am - ap;
-                        if (c < 0)
-                        {
-                            c = 0;
-                        }
-                        curDamage = (int)(curDamage * (100f / (100 + c)) + 0.5f);
-                    }
                     float dir = transform.position.x < hitTrigger.transform.position.x ? -1 : 1;
                     switch (bulletType)
                     {
@@ -174,7 +161,7 @@ public class Bullet : MonoBehaviour
                             hitTrigger.BeHit(attackInfo, dir);
                             if (hitTrigger.owner.debugAttackFrom)
                             {
-                                hitTrigger.owner.DebugAttackFrom(owner.name, curDamage);
+                                hitTrigger.owner.DebugAttackFrom(owner.name, attackInfo.damage);
                             }
                             isGetTarget = true;
                             if (canStop && (hitTrigger.owner.gameObject.layer == 6 || hitTrigger.owner.gameObject.layer == 7))
@@ -204,7 +191,7 @@ public class Bullet : MonoBehaviour
                             hitTrigger.BeHit(attackInfo,dir);
                             if (hitTrigger.owner.debugAttackFrom)
                             {
-                                hitTrigger.owner.DebugAttackFrom(owner.name, curDamage);
+                                hitTrigger.owner.DebugAttackFrom(owner.name, attackInfo.damage);
                             }
                             break;
                         case BulletType.Bomb:

+ 30 - 31
ActionTowerDefense/Assets/Scripts/Characters/AttackController.cs

@@ -16,8 +16,8 @@ public enum AttackEffect
 
     //非控制
     Armor = 100,              //穿甲
-    ChangeDamage = 101,       //更改攻击力
-    Vulnerable = 102,       //易伤
+    Vulnerable = 101,         //易伤
+    ChangeDamage = 102,       //更改攻击力
     SustainedInjury = 103,    //持续伤害
     Burn = 104,               //灼烧
     //中毒
@@ -32,8 +32,7 @@ public class AttackInfo
     public AttackEffect[] attackEffect;
 
     //漂浮
-    [Serializable]
-    public struct FloatState
+    [Serializable]public struct FloatState
     {
         public float time;          //漂浮时间
         public Vector2 upTime;      //上升最大耗时
@@ -45,13 +44,11 @@ public class AttackInfo
     {
         return attackEffect.Contains(AttackEffect.FloatState);
     }
-    [Header("漂浮")]
-    [ShowIf("ShowFloatStateValue")]
+    [ShowIf("ShowFloatStateValue")][LabelText("漂浮参数")]
     public FloatState floatState;
 
     //击飞
-    [Serializable]
-    public struct BlowUp
+    [Serializable]public struct BlowUp
     {
         public Vector3 dir; //击打的方向
         public float force; //击打的力
@@ -61,13 +58,11 @@ public class AttackInfo
     {
         return attackEffect.Contains(AttackEffect.BlowUp);
     }
-    [Header("击飞")]
-    [ShowIf("ShowBlowUpValue")]
+    [ShowIf("ShowBlowUpValue")][LabelText("击飞参数")]
     public BlowUp blowUp;
 
     //击落
-    [Serializable]
-    public struct ShotDown
+    [Serializable]public struct ShotDown
     {
         public Vector3 dir; //击打的方向
         public float force; //击打的力
@@ -77,13 +72,11 @@ public class AttackInfo
     {
         return attackEffect.Contains(AttackEffect.ShotDown);
     }
-    [Header("击落")]
-    [ShowIf("ShowShotDownValue")]
+    [ShowIf("ShowShotDownValue")][LabelText("击落参数")]
     public ShotDown shotDown;
 
     //击晕
-    [Serializable]
-    public struct Stun
+    [Serializable]public struct Stun
     {
         public float time;  //击晕时间
     }
@@ -91,27 +84,36 @@ public class AttackInfo
     {
         return attackEffect.Contains(AttackEffect.Stun);
     }
-    [Header("击晕")]
-    [ShowIf("ShowStunValue")]
+    [ShowIf("ShowStunValue")][LabelText("击晕参数")]
     public Stun stun;
 
     //穿甲
-    [Serializable]
-    public struct Armor
+    [Serializable]public struct Armor
     {
-        public float rate;  //穿甲率
+        public int rate;  //穿甲率
     }
     private bool ShowArmorValue()
     {
         return attackEffect.Contains(AttackEffect.Armor);
     }
-    [Header("穿甲")]
-    [ShowIf("ShowArmorValue")]
+    [ShowIf("ShowArmorValue")][LabelText("穿甲参数")]
     public Armor armor;
 
+    //易伤
+    [Searchable]public struct Vulnerable
+    {
+        public float rate;  //伤害倍率
+        public float time;  //持续时间
+    }
+    private bool ShowVulnerable()
+    {
+        return attackEffect.Contains(AttackEffect.Vulnerable);
+    }
+    [ShowIf("ShowVulnerable")][LabelText("易伤参数")]
+    public Vulnerable vulnerable;
+
     //增加和减少攻击力
-    [Serializable]
-    public struct ChangeDamage
+    [Serializable]public struct ChangeDamage
     {
         public float rate;  //增加或减少攻击倍率
     }
@@ -119,13 +121,11 @@ public class AttackInfo
     {
         return attackEffect.Contains(AttackEffect.ChangeDamage);
     }
-    [Header("更改攻击力")]
-    [ShowIf("ShowChangeDamageValue")]
+    [ShowIf("ShowChangeDamageValue")][LabelText("更改攻击力参数")]
     public ChangeDamage changeDamage;
 
     //持续伤害
-    [Serializable]
-    public struct SustainedInjury
+    [Serializable]public struct SustainedInjury
     {
         public float damage;    //每次造成的伤害数值
     }
@@ -133,8 +133,7 @@ public class AttackInfo
     {
         return attackEffect.Contains(AttackEffect.SustainedInjury);
     }
-    [Header("持续伤害")]
-    [ShowIf("ShowSustainedInjuryValue")]
+    [ShowIf("ShowSustainedInjuryValue")][LabelText("易伤参数")]
     public SustainedInjury sustainedInjury;
 
     public void CopyTo(AttackInfo ai)

+ 1 - 24
ActionTowerDefense/Assets/Scripts/Characters/AttackTrigger.cs

@@ -23,7 +23,6 @@ public class AttackTrigger : MonoBehaviour
     public List<BeHitTrigger> trigedObjs;
     [Header("¹¥»÷ÊôÐÔ")]
     public AttackInfo attackInfo;
-    public int damage;
     public Vector3 force;
     public bool changeHurt;
     public float repelValue;
@@ -63,32 +62,10 @@ public class AttackTrigger : MonoBehaviour
                     return;
                 }
                 trigedObjs.Add(hitTrigger);
-                if (onlyFlyCanWeak && !hitTrigger.owner.canFly)
-                {
-                    MoveCharacter moveCharacter = hitTrigger.owner.GetComponent<MoveCharacter>();
-                    if (moveCharacter)
-                    {
-                        moveCharacter.newTotalWeakTime = 0;
-                    }
-                }
-                //¼ÆË㻤¼×¼õÃâ
-                int curDamage = damage;
-                int am = hitTrigger.owner.armor;
-                if (am > 0)
-                {
-                    int ap = owner.attackController.armorPiercing;
-                    int c = am - ap;
-                    if (c < 0)
-                    {
-                        c = 0;
-                    }
-                    curDamage = (int)(curDamage * (100f / (100 + c)) + 0.5f);
-                }
-                //hitTrigger.BeHit(curDamage, force, changeHurt, repelValue);
                 hitTrigger.BeHit(attackInfo, owner.bodyTrans.localScale.x);
                 if (hitTrigger.owner.debugAttackFrom)
                 {
-                    hitTrigger.owner.DebugAttackFrom(owner.name, curDamage);
+                    hitTrigger.owner.DebugAttackFrom(owner.name, attackInfo.damage);
                 }
                 if (owner.GetComponent<Demonic>())
                 {

+ 101 - 57
ActionTowerDefense/Assets/Scripts/Characters/AttributeStatus.cs

@@ -1,9 +1,24 @@
-using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
 using System;
+using Sirenix.OdinInspector;
 
 
+//各个状态
+public enum SpecialState
+{
+    Null = -1,
+
+    //控制
+    FloatState = 0,
+    ShotDown = 1,
+    BlownUp = 2,
+    Stun = 3,
+
+    //非控制
+    armor,
+}
+
 public class AttributeStatus : MonoBehaviour
 {
     //组件
@@ -11,16 +26,6 @@ public class AttributeStatus : MonoBehaviour
     private Rigidbody rb;
     private Foot foot; 
 
-    //各个状态
-    public enum SpecialState
-    {
-        Null = -1,
-        FloatState = 0,
-        ShotDown = 1,
-        BlownUp = 2,
-        Stun = 3,
-        Coma = 4,
-    }
     public List<SpecialState> curSpecialStates = new List<SpecialState> {SpecialState.Null};    //[0]存放控制类状态,没有则为SpecialState.Null,[1:]存放其他状态
 
     [Header("各状态时间")]
@@ -30,24 +35,29 @@ public class AttributeStatus : MonoBehaviour
     [Serializable]
     public struct Resistances
     {
-        [Range(0, 1)]
+        //控制效果抗性
+        [Range(0, 1)][LabelText("漂浮抗性")]
         public float Float;
-        [Range(0,1)]
+        [Range(0, 1)][LabelText("击飞抗性")]
         public float BlowUp;
-        [Range(0,1)]
+        [Range(0, 1)][LabelText("击落抗性")]
         public float ShotDown;
-        [Range(0,1)]
+        [Range(0, 1)][LabelText("击晕抗性")]
         public float Stun;
+
+        [Space]
+        //非控制效果抗性
+        [LabelText("护甲值")]public int armor;
     }
-    [Header("抗性")]
-    public Resistances resistances;
+    [LabelText("抗性")]public Resistances resistances;
 
     [Header("被击飞阻力")]
     public float decelerationRatioX = 2f;
     public float decelerationRatioY = 15f;
 
     //漂浮
-    public int floatingState;      //0:不漂浮;1:漂浮中;2:飘着;3:掉下去
+    [FoldoutGroup("漂浮")]
+    [DisplayOnly]public int floatingState;      //0:不漂浮;1:漂浮中;2:飘着;3:掉下去
     private Vector3 origPos;        //初始位置
     private float curHeight;        //当前所在高度
     private float riseTime;         //上升时间
@@ -66,9 +76,9 @@ public class AttributeStatus : MonoBehaviour
     }
 
     //CharacterState为SpecialStatus时调用此函数
-    public void SpecialStateEffect()
+    public void SpecialStateEffect(SpecialState specialState)
     {
-        switch (curSpecialStates[0])
+        switch (specialState)
         {
             //漂浮
             case SpecialState.FloatState:
@@ -210,14 +220,23 @@ public class AttributeStatus : MonoBehaviour
         }
     }
 
+    //判断优先级,ture为优先级高于当前控制
+    public bool PriorityOrder(SpecialState specialState)
+    {
+        if (curSpecialStates[0] != SpecialState.Null && curSpecialStates[0] < specialState)
+        {
+            return false;
+        }
+        return true;
+    }
+
     //受到漂浮
     public void AddFloat(AttackInfo.FloatState floatState)
     {
-        if (curSpecialStates[0] != SpecialState.Null && curSpecialStates[0] < SpecialState.FloatState)
+        if (PriorityOrder(SpecialState.FloatState))
         {
             return;
-        }
-
+        } 
 
         rb.useGravity = false;
         floatingState = 1;
@@ -235,63 +254,88 @@ public class AttributeStatus : MonoBehaviour
         attributeTime = floatState.time * (1 - resistances.Float);
 
         curSpecialStates[0] = SpecialState.FloatState;
-        character.ChangeState(CharacterState.SpecialStatus);
+        character.ChangeState(CharacterState.SpecialStatus_Float);
     }
 
-
     //受到击飞
     public void AddBlowUp(AttackInfo.BlowUp blowUp, float dir)
     {
-        if (rb.useGravity)
+        if (!rb.useGravity)
         {
-            if(curSpecialStates[0]!=SpecialState.Null && curSpecialStates[0] < SpecialState.BlownUp)
-            {
-                return;
-            }
-            attributeTime = blowUp.time * (1 - resistances.BlowUp);
-            Vector3 vec3 = blowUp.dir.normalized;
-            if(dir < 0)
-            {
-                vec3.x = -vec3.x;
-            }
-            rb.AddForce(vec3 * blowUp.force * (1 - resistances.BlowUp), ForceMode.Impulse);
-            curSpecialStates[0] = SpecialState.BlownUp;
-            character.ChangeState(CharacterState.SpecialStatus);
+            return;
+        }
+        if (PriorityOrder(SpecialState.BlownUp))
+        {
+            return;
         }
+        attributeTime = blowUp.time * (1 - resistances.BlowUp);
+        Vector3 vec3 = blowUp.dir.normalized;
+        if (dir < 0)
+        {
+            vec3.x = -vec3.x;
+        }
+        rb.AddForce(vec3 * blowUp.force * (1 - resistances.BlowUp), ForceMode.Impulse);
+        curSpecialStates[0] = SpecialState.BlownUp;
+        character.ChangeState(CharacterState.SpecialStatus_BlowUp);
     }
 
     //受到击落
     public void AddShotDown(AttackInfo.ShotDown shotDown, float dir)
     {
-        if (!rb.useGravity)
+        if (rb.useGravity)
         {
-            if (curSpecialStates[0] != SpecialState.Null && curSpecialStates[0] < SpecialState.ShotDown)
-            {
-                return;
-            }
-            attributeTime = shotDown.time * (1 - resistances.ShotDown);
-            Vector3 vec3 = shotDown.dir.normalized;
-            if (dir < 0)
-            {
-                vec3.x = -vec3.x;
-            }
-            rb.useGravity = true;
-            rb.constraints = RigidbodyConstraints.FreezeRotation | RigidbodyConstraints.FreezePositionZ;
-            rb.AddForce(vec3 * shotDown.force * (1 - resistances.ShotDown),ForceMode.Impulse);
-            curSpecialStates[0] = SpecialState.ShotDown;
-            character.ChangeState(CharacterState.SpecialStatus);
+            return;
+        }
+        if (PriorityOrder(SpecialState.ShotDown))
+        {
+            return;
         }
+        attributeTime = shotDown.time * (1 - resistances.ShotDown);
+        Vector3 vec3 = shotDown.dir.normalized;
+        if (dir < 0)
+        {
+            vec3.x = -vec3.x;
+        }
+        rb.useGravity = true;
+        rb.constraints = RigidbodyConstraints.FreezeRotation | RigidbodyConstraints.FreezePositionZ;
+        rb.AddForce(vec3 * shotDown.force * (1 - resistances.ShotDown), ForceMode.Impulse);
+        curSpecialStates[0] = SpecialState.ShotDown;
+        character.ChangeState(CharacterState.SpecialStatus_ShotDown);
     }
 
     //受到击晕
     public void AddStun(AttackInfo.Stun stun)
     {
-        if (curSpecialStates[0] != SpecialState.Null && curSpecialStates[0] < SpecialState.Stun)
+        if (PriorityOrder(SpecialState.Stun))
         {
             return;
         }
         attributeTime = stun.time * (1 - resistances.Stun);
         curSpecialStates[0] = SpecialState.Stun;
-        character.ChangeState(CharacterState.SpecialStatus);
+        character.ChangeState(CharacterState.SpecialStatus_Stun);
+    }
+
+    //受到穿甲
+    public int AddArmor(AttackInfo.Armor armor,int damage)
+    {
+        //计算护甲减免
+        int am = resistances.armor;
+        if (am > 0)
+        {
+            int ap = armor.rate;
+            int c = am - ap;
+            if (c < 0)
+            {
+                c = 0;
+            }
+            damage = (int)(damage * (100f / (100 + c)) + 0.5f);
+        }
+        return damage;
+    }
+
+    //受到易伤
+    public void AddVulnerable(AttackInfo.Vulnerable vulnerable)
+    {
+
     }
 }

+ 5 - 5
ActionTowerDefense/Assets/Scripts/Characters/Character.cs

@@ -20,9 +20,12 @@ public enum CharacterState
     Rush = 9,
     Sprint = 10,
     Die = 11,
-    SpecialStatus = 12,
 
-    Float = 15,             //空中漂浮
+    //控制效果
+    SpecialStatus_Float,
+    SpecialStatus_ShotDown,
+    SpecialStatus_BlowUp,
+    SpecialStatus_Stun,
 
     LockSoul = 25,          //在锁魂塔中
     Conduct = 26,           //在指挥中
@@ -85,9 +88,6 @@ public class Character : MonoBehaviour
     public bool showInjuryNum;      //伤害跳字开关
     public bool canFly = false;
 
-    [Header("护甲")]
-    public int armor;
-
     [Header("锁魂塔")]
     public LockSoul ls;
     public bool isInSoulTower;      //在锁魂塔范围内

+ 11 - 4
ActionTowerDefense/Assets/Scripts/Characters/Demonic.cs

@@ -252,8 +252,6 @@ public class Demonic : MoveCharacter
         //hurtKeepTime -= Time.deltaTime;
         dieKeepTime -= Time.deltaTime;
         invincibleTime -= Time.deltaTime;
-        weakTime -= Time.deltaTime;
-        beRepelValue += Time.deltaTime;
         Vector3 leftDir = GetMoveDir();
         bool isAttack = GetAttack();
 
@@ -509,8 +507,17 @@ public class Demonic : MoveCharacter
                     }
                 }
                 break;
-            case CharacterState.SpecialStatus:
-                attributeStatus.SpecialStateEffect();
+            case CharacterState.SpecialStatus_Float:
+                attributeStatus.SpecialStateEffect(SpecialState.FloatState);
+                break;
+            case CharacterState.SpecialStatus_BlowUp:
+                attributeStatus.SpecialStateEffect(SpecialState.BlownUp);
+                break;
+            case CharacterState.SpecialStatus_ShotDown:
+                attributeStatus.SpecialStateEffect(SpecialState.ShotDown);
+                break;
+            case CharacterState.SpecialStatus_Stun:
+                attributeStatus.SpecialStateEffect(SpecialState.Stun);
                 break;
             default:
                 break;

+ 11 - 4
ActionTowerDefense/Assets/Scripts/Characters/Enemy.cs

@@ -203,8 +203,6 @@ public class Enemy : MoveCharacter
         //hurtKeepTime -= Time.deltaTime;
         dieKeepTime -= Time.deltaTime;
         invincibleTime -= Time.deltaTime;
-        weakTime -= Time.deltaTime;
-        beRepelValue += Time.deltaTime;
         Vector3 leftDir = GetMoveDir();
         bool isAttack = GetAttack();
 
@@ -391,8 +389,17 @@ public class Enemy : MoveCharacter
                     break;
                 }
                 break;
-            case CharacterState.SpecialStatus:
-                attributeStatus.SpecialStateEffect();
+            case CharacterState.SpecialStatus_Float:
+                attributeStatus.SpecialStateEffect(SpecialState.FloatState);
+                break;
+            case CharacterState.SpecialStatus_BlowUp:
+                attributeStatus.SpecialStateEffect(SpecialState.BlownUp);
+                break;
+            case CharacterState.SpecialStatus_ShotDown:
+                attributeStatus.SpecialStateEffect(SpecialState.ShotDown);
+                break;
+            case CharacterState.SpecialStatus_Stun:
+                attributeStatus.SpecialStateEffect(SpecialState.Stun);
                 break;
             default:
                 break;

+ 13 - 31
ActionTowerDefense/Assets/Scripts/Characters/MoveCharacter.cs

@@ -35,38 +35,11 @@ public class MoveCharacter : Character
     [HideInInspector]
     public int isAdjustHeight;
 
-    [Header("虚弱状态")]
-    public float totalBeRepelValue;   
-    [HideInInspector]
-    public float beRepelValue;
-    public float weakTime;
-    public float totalWeakTime;
-    [HideInInspector]
-    public float newTotalWeakTime;
-    public float weakHitRate = 2;
-
-    [Header("易伤减伤")]
-    public float easyToGetHit = 0.2f;
+    [Header("减伤")]
     public bool isDamageReduction;
     public float reductionDegree;
     public GameObject reductionEffect;
 
-    [Header("被击飞减速度")]
-    public float decelerationRatio = 1f;
-
-    [Header("眩晕参数")]
-    public float comaTime = 5;
-    public float pastComaTime;
-
-    [Header("漂浮")]
-
-    public float floatTime = 20;    //漂浮时间
-
-
-
-
-
-
     [Header("临时血量")]
     public GameObject effect;
     private int temptHP;
@@ -108,7 +81,7 @@ public class MoveCharacter : Character
 
     private void Start()
     {
-        newTotalWeakTime = totalWeakTime;
+
     }
 
     //0:漂浮 1:正常 2:无敌
@@ -239,12 +212,14 @@ public class MoveCharacter : Character
     public override void BeHit(AttackInfo attackInfo, float dir)
     {
         base.BeHit(attackInfo, dir);
+        int damage = attackInfo.damage;
         if (attackInfo.attackEffect.Length > 0)
         {
             foreach (AttackEffect ae in attackInfo.attackEffect)
             {
                 switch (ae)
                 {
+                    /*控制*/
                     //漂浮
                     case AttackEffect.FloatState:
                         attributeStatus.AddFloat(attackInfo.floatState);
@@ -261,12 +236,19 @@ public class MoveCharacter : Character
                     case AttackEffect.Stun:
                         attributeStatus.AddStun(attackInfo.stun);
                         break;
+
+                    /*非控制*/
+                    //穿甲
+                    case AttackEffect.Armor:
+                        damage = attributeStatus.AddArmor(attackInfo.armor, damage);
+                        break;
+                    //易伤
+                    case AttackEffect.Vulnerable:
+                        break;
                 }
             }
         }
 
-        int damage = attackInfo.damage;
-
         //伤害减免
         if (isDamageReduction)
         {

+ 12 - 4
ActionTowerDefense/Assets/Scripts/Characters/PlayerController.cs

@@ -1055,8 +1055,6 @@ public class PlayerController : MoveCharacter
         rushTime -= Time.deltaTime;
         cacheRushTime -= Time.deltaTime;
         dieKeepTime -= Time.deltaTime;
-        weakTime -= Time.deltaTime;
-        beRepelValue += Time.deltaTime;
         if (nowConductButton != -1)
         {
             conductTime += Time.deltaTime;
@@ -1399,8 +1397,18 @@ public class PlayerController : MoveCharacter
                 {
                     ChangeState(CharacterState.Idle);
                 }
-
-
+                break;
+            case CharacterState.SpecialStatus_Float:
+                attributeStatus.SpecialStateEffect(SpecialState.FloatState);
+                break;
+            case CharacterState.SpecialStatus_BlowUp:
+                attributeStatus.SpecialStateEffect(SpecialState.BlownUp);
+                break;
+            case CharacterState.SpecialStatus_ShotDown:
+                attributeStatus.SpecialStateEffect(SpecialState.ShotDown);
+                break;
+            case CharacterState.SpecialStatus_Stun:
+                attributeStatus.SpecialStateEffect(SpecialState.Stun);
                 break;
             default:
                 break;

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

@@ -125,8 +125,8 @@ public class WavePowerSkill : MonoBehaviour
                     }
                     else
                     {
-                        singleTarget.comaTime = continueTime + moreComaTime;
                         //报错了先注释掉,之后改
+                        //singleTarget.comaTime = continueTime + moreComaTime;
                         //singleTarget.ChangeState(CharacterState.Coma);
                         singleTarget.transform.position -= new Vector3(longFX * longSpeed * Time.deltaTime, 0, 0);
                         curHitTime += Time.deltaTime;
@@ -144,8 +144,8 @@ public class WavePowerSkill : MonoBehaviour
                 {
                     if (!ene.isDie)
                     {
-                        ene.comaTime = continueTime + moreComaTime;
                         //报错了先注释掉,之后改
+                        //ene.comaTime = continueTime + moreComaTime;
                         //ene.ChangeState(CharacterState.Coma);
                         ene.transform.position -= new Vector3(longSpeed * Time.deltaTime, 0, 0);
                         curHitTime += Time.deltaTime;
@@ -201,8 +201,9 @@ public class WavePowerSkill : MonoBehaviour
         {
             Enemy ene = other.GetComponentInParent<Enemy>();
             targetEnes.Remove(ene);
+            //报错了,先注释一下之后改
             //ene.ChangeState(CharacterState.Weak);
-            ene.weakTime = moreComaTime;
+            //ene.weakTime = moreComaTime;
             //ene.ChangeState(CharacterState.Idle);
         }
     }