浏览代码

修复变身法师免控bug

SZAND\msx_2 1 年之前
父节点
当前提交
c9822c77b7
共有 20 个文件被更改,包括 201 次插入95 次删除
  1. 24 1
      ActionTowerDefense/Assets/Animations/Spirits_Float/SpiritsFloatCollider.controller
  2. 9 3
      ActionTowerDefense/Assets/Resources/Prefab/Demonic_Arrow.prefab
  3. 3 3
      ActionTowerDefense/Assets/Resources/Prefab/Demonic_Giant.prefab
  4. 3 3
      ActionTowerDefense/Assets/Resources/Prefab/Demonic_Sword.prefab
  5. 7 1
      ActionTowerDefense/Assets/Resources/Prefab/Enemy_Arrow.prefab
  6. 1 1
      ActionTowerDefense/Assets/Resources/Prefab/Enemy_Giant.prefab
  7. 1 1
      ActionTowerDefense/Assets/Resources/Prefab/Enemy_Sword.prefab
  8. 11 5
      ActionTowerDefense/Assets/Resources/Prefab/MySpirit/Spirits_Assassin.prefab
  9. 13 7
      ActionTowerDefense/Assets/Resources/Prefab/MySpirit/Spirits_Cook.prefab
  10. 2 2
      ActionTowerDefense/Assets/Resources/Prefab/MySpirit/Spirits_Float.prefab
  11. 11 5
      ActionTowerDefense/Assets/Resources/Prefab/MySpirit/Spirits_Invisible.prefab
  12. 6 5
      ActionTowerDefense/Assets/Resources/Prefab/Transfiguration/Trans_Assassin.prefab
  13. 8 7
      ActionTowerDefense/Assets/Resources/Prefab/Transfiguration/Trans_Cook.prefab
  14. 3 2
      ActionTowerDefense/Assets/Resources/Prefab/Transfiguration/Trans_Float.prefab
  15. 6 5
      ActionTowerDefense/Assets/Resources/Prefab/Transfiguration/Trans_Invisible.prefab
  16. 7 0
      ActionTowerDefense/Assets/Scripts/Demonic.cs
  17. 7 0
      ActionTowerDefense/Assets/Scripts/Enemy.cs
  18. 49 31
      ActionTowerDefense/Assets/Scripts/MoveCharacter.cs
  19. 27 13
      ActionTowerDefense/Assets/Scripts/PlayerController.cs
  20. 3 0
      ActionTowerDefense/Assets/Scripts/Spirits/Trans_Float.cs

+ 24 - 1
ActionTowerDefense/Assets/Animations/Spirits_Float/SpiritsFloatCollider.controller

@@ -89,6 +89,28 @@ AnimatorStateMachine:
   m_ExitPosition: {x: 800, y: 120, z: 0}
   m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
   m_DefaultState: {fileID: -7486628673260349768}
+--- !u!1101 &-4812624795755405919
+AnimatorStateTransition:
+  m_ObjectHideFlags: 1
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_Name: 
+  m_Conditions: []
+  m_DstStateMachine: {fileID: 0}
+  m_DstState: {fileID: 2306193328987281368}
+  m_Solo: 0
+  m_Mute: 0
+  m_IsExit: 0
+  serializedVersion: 3
+  m_TransitionDuration: 0.25
+  m_TransitionOffset: 0
+  m_ExitTime: 0.75
+  m_HasExitTime: 1
+  m_HasFixedDuration: 1
+  m_InterruptionSource: 0
+  m_OrderedInterruption: 1
+  m_CanTransitionToSelf: 1
 --- !u!1102 &-4797466697162965913
 AnimatorState:
   serializedVersion: 6
@@ -265,7 +287,8 @@ AnimatorState:
   m_Name: Attack2
   m_Speed: 1
   m_CycleOffset: 0
-  m_Transitions: []
+  m_Transitions:
+  - {fileID: -4812624795755405919}
   m_StateMachineBehaviours: []
   m_Position: {x: 50, y: 50, z: 0}
   m_IKOnFeet: 0

+ 9 - 3
ActionTowerDefense/Assets/Resources/Prefab/Demonic_Arrow.prefab

@@ -964,6 +964,8 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: c1bedfb340186164dbac1499b49b879e, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
+  isTran: 0
+  pc: {fileID: 0}
   HitCols:
   - {fileID: 1190225091429982147}
   - {fileID: 5388987656270167698}
@@ -1045,13 +1047,17 @@ MonoBehaviour:
   minHurtKeepTime: 0.2
   hurtKeepTime: 0
   hurtChangeVelocity: 1
-  maxTime: 0
-  minTime: 6
+  comaTime: 5
+  pastComaTime: 0
+  isCaughtByCook: 0
+  isBeDropped: 0
+  maxTime: 1.5
+  minTime: 0.1
   maxHeight: 12
   minHeight: 7
   maxRotateSpeed: 20
   minRotateSpeed: 5
-  floatTime: 20
+  floatTime: 10
   isFloat: 0
   normalFallSpeed: 10
   rapidFallSpeed: 30

+ 3 - 3
ActionTowerDefense/Assets/Resources/Prefab/Demonic_Giant.prefab

@@ -503,13 +503,13 @@ MonoBehaviour:
   pastComaTime: 0
   isCaughtByCook: 0
   isBeDropped: 0
-  maxTime: 0
-  minTime: 6
+  maxTime: 1.5
+  minTime: 0.1
   maxHeight: 12
   minHeight: 7
   maxRotateSpeed: 20
   minRotateSpeed: 5
-  floatTime: 20
+  floatTime: 10
   isFloat: 0
   normalFallSpeed: 10
   rapidFallSpeed: 30

+ 3 - 3
ActionTowerDefense/Assets/Resources/Prefab/Demonic_Sword.prefab

@@ -245,13 +245,13 @@ MonoBehaviour:
   pastComaTime: 0
   isCaughtByCook: 0
   isBeDropped: 0
-  maxTime: 0
-  minTime: 6
+  maxTime: 1.5
+  minTime: 0.1
   maxHeight: 12
   minHeight: 7
   maxRotateSpeed: 20
   minRotateSpeed: 5
-  floatTime: 20
+  floatTime: 10
   isFloat: 0
   normalFallSpeed: 10
   rapidFallSpeed: 30

+ 7 - 1
ActionTowerDefense/Assets/Resources/Prefab/Enemy_Arrow.prefab

@@ -964,6 +964,8 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: 7475a7d33f657b146a4994b1e02710ad, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
+  isTran: 0
+  pc: {fileID: 0}
   HitCols:
   - {fileID: 5388987656270167698}
   - {fileID: 1190225091429982147}
@@ -1045,13 +1047,17 @@ MonoBehaviour:
   minHurtKeepTime: 0.2
   hurtKeepTime: 0
   hurtChangeVelocity: 1
+  comaTime: 5
+  pastComaTime: 0
+  isCaughtByCook: 0
+  isBeDropped: 0
   maxTime: 1.5
   minTime: 0.1
   maxHeight: 9
   minHeight: 4
   maxRotateSpeed: 20
   minRotateSpeed: 5
-  floatTime: 20
+  floatTime: 10
   isFloat: 0
   normalFallSpeed: 10
   rapidFallSpeed: 30

+ 1 - 1
ActionTowerDefense/Assets/Resources/Prefab/Enemy_Giant.prefab

@@ -509,7 +509,7 @@ MonoBehaviour:
   minHeight: 4
   maxRotateSpeed: 20
   minRotateSpeed: 5
-  floatTime: 20
+  floatTime: 10
   isFloat: 0
   normalFallSpeed: 10
   rapidFallSpeed: 30

+ 1 - 1
ActionTowerDefense/Assets/Resources/Prefab/Enemy_Sword.prefab

@@ -304,7 +304,7 @@ MonoBehaviour:
   minHeight: 4
   maxRotateSpeed: 20
   minRotateSpeed: 5
-  floatTime: 20
+  floatTime: 10
   isFloat: 0
   normalFallSpeed: 10
   rapidFallSpeed: 30

+ 11 - 5
ActionTowerDefense/Assets/Resources/Prefab/MySpirit/Spirits_Assassin.prefab

@@ -206,6 +206,8 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: c1bedfb340186164dbac1499b49b879e, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
+  isTran: 0
+  pc: {fileID: 0}
   HitCols:
   - {fileID: 6526817785665782971}
   - {fileID: 8769150919382874379}
@@ -275,13 +277,17 @@ MonoBehaviour:
   minHurtKeepTime: 0.2
   hurtKeepTime: 0
   hurtChangeVelocity: 1
-  maxTime: 15
-  minTime: 6
+  comaTime: 5
+  pastComaTime: 0
+  isCaughtByCook: 0
+  isBeDropped: 0
+  maxTime: 1.5
+  minTime: 0.1
   maxHeight: 12
   minHeight: 7
-  maxRotateSpeed: 0
-  minRotateSpeed: 0
-  floatTime: 20
+  maxRotateSpeed: 10
+  minRotateSpeed: 4
+  floatTime: 5
   isFloat: 0
   normalFallSpeed: 10
   rapidFallSpeed: 30

+ 13 - 7
ActionTowerDefense/Assets/Resources/Prefab/MySpirit/Spirits_Cook.prefab

@@ -791,6 +791,8 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: c1bedfb340186164dbac1499b49b879e, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
+  isTran: 0
+  pc: {fileID: 0}
   HitCols: []
   cookNum: 10
   mecanim: {fileID: 7573527827155227431}
@@ -847,13 +849,17 @@ MonoBehaviour:
   minHurtKeepTime: 0
   hurtKeepTime: 0
   hurtChangeVelocity: 0
-  maxTime: 0
-  minTime: 0
-  maxHeight: 0
-  minHeight: 0
-  maxRotateSpeed: 0
-  minRotateSpeed: 0
-  floatTime: 0
+  comaTime: 5
+  pastComaTime: 0
+  isCaughtByCook: 0
+  isBeDropped: 0
+  maxTime: 1.5
+  minTime: 0.1
+  maxHeight: 12
+  minHeight: 7
+  maxRotateSpeed: 10
+  minRotateSpeed: 4
+  floatTime: 5
   isFloat: 0
   normalFallSpeed: 10
   rapidFallSpeed: 30

+ 2 - 2
ActionTowerDefense/Assets/Resources/Prefab/MySpirit/Spirits_Float.prefab

@@ -1068,8 +1068,8 @@ MonoBehaviour:
   pastComaTime: 0
   isCaughtByCook: 0
   isBeDropped: 0
-  maxTime: 15
-  minTime: 6
+  maxTime: 1.5
+  minTime: 0.1
   maxHeight: 12
   minHeight: 7
   maxRotateSpeed: 10

+ 11 - 5
ActionTowerDefense/Assets/Resources/Prefab/MySpirit/Spirits_Invisible.prefab

@@ -201,6 +201,8 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: c1bedfb340186164dbac1499b49b879e, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
+  isTran: 0
+  pc: {fileID: 0}
   HitCols:
   - {fileID: 6526817785665782971}
   - {fileID: 8769150919382874379}
@@ -270,13 +272,17 @@ MonoBehaviour:
   minHurtKeepTime: 0.2
   hurtKeepTime: 0
   hurtChangeVelocity: 1
-  maxTime: 0
-  minTime: 6
+  comaTime: 5
+  pastComaTime: 0
+  isCaughtByCook: 0
+  isBeDropped: 0
+  maxTime: 1.5
+  minTime: 0.1
   maxHeight: 12
   minHeight: 7
-  maxRotateSpeed: 20
-  minRotateSpeed: 5
-  floatTime: 20
+  maxRotateSpeed: 10
+  minRotateSpeed: 4
+  floatTime: 5
   isFloat: 0
   normalFallSpeed: 10
   rapidFallSpeed: 30

+ 6 - 5
ActionTowerDefense/Assets/Resources/Prefab/Transfiguration/Trans_Assassin.prefab

@@ -206,6 +206,7 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   isTran: 1
+  pc: {fileID: 0}
   HitCols:
   - {fileID: 6526817785665782971}
   - {fileID: 8769150919382874379}
@@ -279,13 +280,13 @@ MonoBehaviour:
   pastComaTime: 0
   isCaughtByCook: 0
   isBeDropped: 0
-  maxTime: 15
-  minTime: 6
+  maxTime: 1.5
+  minTime: 0.1
   maxHeight: 12
   minHeight: 7
-  maxRotateSpeed: 0
-  minRotateSpeed: 0
-  floatTime: 20
+  maxRotateSpeed: 10
+  minRotateSpeed: 4
+  floatTime: 5
   isFloat: 0
   normalFallSpeed: 10
   rapidFallSpeed: 30

+ 8 - 7
ActionTowerDefense/Assets/Resources/Prefab/Transfiguration/Trans_Cook.prefab

@@ -791,6 +791,7 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   isTran: 1
+  pc: {fileID: 0}
   HitCols: []
   cookNum: 10
   mecanim: {fileID: 7573527827155227431}
@@ -851,13 +852,13 @@ MonoBehaviour:
   pastComaTime: 0
   isCaughtByCook: 0
   isBeDropped: 0
-  maxTime: 0
-  minTime: 0
-  maxHeight: 0
-  minHeight: 0
-  maxRotateSpeed: 0
-  minRotateSpeed: 0
-  floatTime: 0
+  maxTime: 1.5
+  minTime: 0.1
+  maxHeight: 12
+  minHeight: 7
+  maxRotateSpeed: 10
+  minRotateSpeed: 4
+  floatTime: 5
   isFloat: 0
   normalFallSpeed: 10
   rapidFallSpeed: 30

+ 3 - 2
ActionTowerDefense/Assets/Resources/Prefab/Transfiguration/Trans_Float.prefab

@@ -1028,6 +1028,7 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   controller: {fileID: 0}
+  changeTime: 30
   intervalTime: 0.5
   minTime: 7
   maxTime: 9
@@ -1149,8 +1150,8 @@ MonoBehaviour:
   pastComaTime: 0
   isCaughtByCook: 0
   isBeDropped: 0
-  maxTime: 15
-  minTime: 6
+  maxTime: 1.5
+  minTime: 0.1
   maxHeight: 12
   minHeight: 7
   maxRotateSpeed: 10

+ 6 - 5
ActionTowerDefense/Assets/Resources/Prefab/Transfiguration/Trans_Invisible.prefab

@@ -234,6 +234,7 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   isTran: 1
+  pc: {fileID: 0}
   HitCols:
   - {fileID: 6526817785665782971}
   - {fileID: 8769150919382874379}
@@ -307,13 +308,13 @@ MonoBehaviour:
   pastComaTime: 0
   isCaughtByCook: 0
   isBeDropped: 0
-  maxTime: 0
-  minTime: 6
+  maxTime: 1.5
+  minTime: 0.1
   maxHeight: 12
   minHeight: 7
-  maxRotateSpeed: 20
-  minRotateSpeed: 5
-  floatTime: 20
+  maxRotateSpeed: 10
+  minRotateSpeed: 4
+  floatTime: 5
   isFloat: 0
   normalFallSpeed: 10
   rapidFallSpeed: 30

+ 7 - 0
ActionTowerDefense/Assets/Scripts/Demonic.cs

@@ -449,6 +449,7 @@ public class Demonic : MoveCharacter
             case CharacterState.Hurt:
                 break;
             case CharacterState.Coma:
+                canMove = true;
                 foreach(GameObject i in HitCols)
                 {
                     i.SetActive(true);
@@ -466,6 +467,9 @@ public class Demonic : MoveCharacter
                     rb.constraints += 4; //RigidbodyConstraints.FreezePositionY = 4ŁŹ˛ťÄÜÖą˝ÓźÓ
                 }
                 break;
+            case CharacterState.Float:
+                canMove = true;
+                break;
             default:
                 break;
         }
@@ -537,6 +541,9 @@ public class Demonic : MoveCharacter
                     rb.constraints -= RigidbodyConstraints.FreezePositionY;
                 }
                 break;
+            case CharacterState.Float:
+                canMove = false;
+                break;
             default:
                 break;
         }

+ 7 - 0
ActionTowerDefense/Assets/Scripts/Enemy.cs

@@ -595,7 +595,11 @@ public class Enemy : MoveCharacter
                 break;
             case CharacterState.Weak:
                 break;
+            case CharacterState.Float:
+                canMove = true;
+                break;
             case CharacterState.Coma:
+                canMove = true;
                 foreach (GameObject i in HitCols)
                 {
                     i.SetActive(true);
@@ -690,6 +694,9 @@ public class Enemy : MoveCharacter
                         break;
                 }
                 break;
+            case CharacterState.Float:
+                canMove = false;
+                break;
             case CharacterState.Coma:
                 //ani.Play("Coma", 0, 0);
                 ani.Play("idle", 0, 0);

+ 49 - 31
ActionTowerDefense/Assets/Scripts/MoveCharacter.cs

@@ -32,8 +32,8 @@ public class MoveCharacter : Character
     public bool isBeDropped;
 
     [Header("新增漂浮效果参数")]
-    public float maxTime = 0; //上升最大耗时
-    public float minTime = 6;  //上升最小耗时
+    public float maxTime = 1.5f; //上升最大耗时
+    public float minTime = 0.1f;  //上升最小耗时
     public float maxHeight = 12;    //最大上升高度
     public float minHeight = 7;    //最小上升高度
 
@@ -53,15 +53,12 @@ public class MoveCharacter : Character
 
     public float normalFallSpeed;
     public float rapidFallSpeed;
-    private float curFallSpeed;
+    public float curFallSpeed;
 
     private Vector3 origPos;    //初始位置
     private float origY;
     private float pastTime;     //上升已用时间
     private float rise = 1;
-    private float down = -1;
-    private Vector3 oneClockwise = new Vector3(0, 0, 1);
-    private Vector3 oneCounterClockwise = new Vector3(0, 0, -1);
 
     public int floatState; //0:不漂浮;1:漂浮中;2:飘着;3:掉下去
 
@@ -91,6 +88,7 @@ public class MoveCharacter : Character
         mesh = spinee.GetComponent<MeshRenderer>();
         mats = mesh.materials;
         origY = transform.position.y;
+        curFallSpeed = normalFallSpeed;
     }
 
     private void Start()
@@ -130,28 +128,45 @@ public class MoveCharacter : Character
 
     public void FloatStateOn()
     {
-        if (canMove)
+        if (!isTran)
         {
-            isFloat = true;
-            ChangeMat(0);
-            curTime = 0;
-            if (floatState == 0)
+            if (canMove)
             {
-                origPos = transform.position;
-                curHeight = origPos.y;
+                canMove = false;
+                if (curFallSpeed == 0)
+                {
+                    curFallSpeed = normalFallSpeed;
+                }
+                isFloat = true;
+                ChangeMat(0);
+                curTime = 0;
+                if (floatState == 0)
+                {
+                    origPos = transform.position;
+                    origY = origPos.y;
+                    curHeight = origPos.y;
+                }
+                origPos.x = transform.position.x;
+                ChangeState(CharacterState.Rise);
+                floatState = 1;
+                riseTime = Random.Range(minTime, maxTime);
+                backSpeed = Random.Range(1, 4);
+                if (gameObject.tag == "Enemy" || gameObject.tag == "Player")
+                {
+                    backSpeed = -backSpeed;
+                }
+                rotateSpeed = Random.Range(minRotateSpeed, maxRotateSpeed);
+                rotateDir = (1.5f - Random.Range(1, 3)) * 2;
+                height = Random.Range(minHeight, maxHeight);
             }
-            origPos.x = transform.position.x;
-            ChangeState(CharacterState.Rise);
-            floatState = 1;
-            riseTime = Random.Range(minTime, maxTime);
-            backSpeed = Random.Range(1, 4);
-            if (gameObject.tag == "Enemy" || gameObject.tag == "Player")
+        }
+        else
+        {
+            if (pc == null)
             {
-                backSpeed = -backSpeed;
+                pc = GetComponentInParent<PlayerController>();
             }
-            rotateSpeed = Random.Range(minRotateSpeed, maxRotateSpeed);
-            rotateDir = (1.5f - Random.Range(1, 3)) * 2;
-            height = Random.Range(minHeight, maxHeight);
+            pc.FloatStateOn();
         }
     }
 
@@ -211,7 +226,7 @@ public class MoveCharacter : Character
             {
                 if (!isBeDropped)
                 {
-                    transform.position = origPos;
+                    //transform.position = origPos;
                     ChangeState(CharacterState.Idle);
                 }
                 else
@@ -220,16 +235,19 @@ public class MoveCharacter : Character
                     isBeDropped = false;
                 }
                 ChangeMat(1);
+                /*
                 foreach (Material m in mats)
                 {
                     m.SetInt("_Outline", 0);
-                    floatState = 0;
-                    isFloat = false;
-                    curFallSpeed = normalFallSpeed;
-                    if (gameObject.tag == "Player")
-                    {
-                        GetComponent<PlayerController>().soulCollector.enabled = true;
-                    }
+                }
+                */
+                floatState = 0;
+                isFloat = false;
+                canMove = true;
+                curFallSpeed = normalFallSpeed;
+                if (gameObject.tag == "Player")
+                {
+                    GetComponent<PlayerController>().soulCollector.enabled = true;
                 }
             }
         }

+ 27 - 13
ActionTowerDefense/Assets/Scripts/PlayerController.cs

@@ -392,10 +392,13 @@ public class PlayerController : MoveCharacter
     }
     void OnSummon0()
     {
-        isClickBtnWest = true;
-        if (isTransfiguration)
+        if(!isFloat && canMove)
         {
-            isinputJ = true;
+            isClickBtnWest = true;
+            if (isTransfiguration)
+            {
+                isinputJ = true;
+            }
         }
     }
     void OnSummon0Up()
@@ -407,10 +410,13 @@ public class PlayerController : MoveCharacter
     }
     void OnSummon1()
     {
-        isClickBtnSouth = true;
-        if (isTransfiguration)
+        if (!isFloat && canMove)
         {
-            isinputK = true;
+            isClickBtnSouth = true;
+            if (isTransfiguration)
+            {
+                isinputK = true;
+            }
         }
     }
     void OnSummon1Up()
@@ -422,10 +428,13 @@ public class PlayerController : MoveCharacter
     }
     void OnSummon2()
     {
-        isClickBtnEast = true;
-        if (isTransfiguration)
+        if (!isFloat && canMove)
         {
-            isinputL = true;
+            isClickBtnEast = true;
+            if (isTransfiguration)
+            {
+                isinputL = true;
+            }
         }
     }
     void OnSummon2Up()
@@ -437,19 +446,23 @@ public class PlayerController : MoveCharacter
     }
     void OnSummonSpirit()
     {
-        isSpiritSummon = true;
+        if (!isFloat && canMove)
+            isSpiritSummon = true;
     }
     void OnSummonSpirit1()
     {
-        isSpiritSummon1 = true;
+        if (!isFloat && canMove)
+            isSpiritSummon1 = true;
     }
     void OnSummonSpirit2()
     {
-        isSpiritSummon2 = true;
+        if (!isFloat && canMove)
+            isSpiritSummon2 = true;
     }
     void OnSummonSpirit3()
     {
-        isSpiritSummon3 = true;
+        if (!isFloat && canMove)
+            isSpiritSummon3 = true;
     }
     public void Jump()
     {
@@ -1192,6 +1205,7 @@ public class PlayerController : MoveCharacter
             case CharacterState.Hurt:
                 break;
             case CharacterState.Coma:
+                canMove = true;
                 foreach (GameObject i in HitCols)
                 {
                     i.SetActive(true);

+ 3 - 0
ActionTowerDefense/Assets/Scripts/Spirits/Trans_Float.cs

@@ -5,6 +5,7 @@ using UnityEngine;
 public class Trans_Float : MonoBehaviour
 {
     public PlayerController controller;
+    public float changeTime;
 
     public float intervalTime;              //¹¥»÷Ó²Ö±
     private float pastAttackTime;
@@ -33,6 +34,7 @@ public class Trans_Float : MonoBehaviour
     private void Start()
     {
         controller = GetComponentInParent<PlayerController>();
+        controller.changeTime = changeTime;
         dem = GetComponent<Demonic>();
         controller.canMove = true;
         curlock = Instantiate(lockeffect, new Vector3(0, -50, 0), new Quaternion(0, 0, 0, 0), null);
@@ -102,6 +104,7 @@ public class Trans_Float : MonoBehaviour
             pastTime = 0;
             isK = false;
             controller.canMove = true;
+            controller.ChangeState(CharacterState.Idle);
             once = false;
             curFe.transform.position = curlock.transform.position;
             curlock.SetActive(false);