فهرست منبع

修复boss weak状态下控制效果问题

WGL 2 ماه پیش
والد
کامیت
0bfd6a8d29
1فایلهای تغییر یافته به همراه20 افزوده شده و 3 حذف شده
  1. 20 3
      ActionTowerDefense/Assets/Scripts/Boss/Boss.cs

+ 20 - 3
ActionTowerDefense/Assets/Scripts/Boss/Boss.cs

@@ -52,8 +52,8 @@ public class Boss : MoveCharacter
     public float minInterval, maxInterval;  //쇌몰珂쇌
     public float curInterval;
 
-    [Header("게竟宅肯흽")]
-    private BossState bossState;
+    [FoldoutGroup("실�斤口")]
+    public BossState bossState;
     [LabelText("켐제令")]
     public int totalPatience;               //놓迦켐제令�掘
     private int curPatience;                //뎠품켐제令
@@ -231,6 +231,7 @@ public class Boss : MoveCharacter
                 curPatience = curTotalPatience;
                 //路零켐제係
                 uiPatience.Show(curPatience, curTotalPatience);
+                status.OutSpecialState();
                 nowCanFly = canFly;
                 break;
         }
@@ -238,7 +239,6 @@ public class Boss : MoveCharacter
         switch (bs)
         {
             case BossState.normal:
-                status.OutSpecialState();
                 rb.velocity = Vector3.zero;
                 break;
             case BossState.weak:
@@ -246,6 +246,8 @@ public class Boss : MoveCharacter
                 rb.constraints = RigidbodyConstraints.FreezeRotation | RigidbodyConstraints.FreezePositionZ;
                 ChangeState(CharacterState.Idle);
                 pastWeakTime = weakTime;
+                nowCanFly = false;
+                rb.useGravity = true;
                 break;
             case BossState.rise:
                 flyHeight = Random.Range(minFlyHeight, maxFlyHeight);
@@ -342,6 +344,21 @@ public class Boss : MoveCharacter
             case CharacterState.Attack:
                 OnAttack();
                 break;
+            case CharacterState.HitStun:
+                hitFeedbackSystem.HitStunUpdate();
+                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_Weak:
+                attributeStatus.SpecialStateEffect(SpecialState.Weak);
+                break;
             default:
                 break;
         }