Quellcode durchsuchen

新增灵魂不稳定状态效果,变身隐身解除变身吸魂

LAPTOP-OM1V99U2\永远de小亡灵 vor 1 Jahr
Ursprung
Commit
e049cbd97f
21 geänderte Dateien mit 129 neuen und 45 gelöschten Zeilen
  1. 6 2
      ActionTowerDefense/Assets/Resources/Prefab/ESpirits_Assassin.prefab
  2. 3 1
      ActionTowerDefense/Assets/Resources/Prefab/ESpirits_Cook.prefab
  3. 8 2
      ActionTowerDefense/Assets/Resources/Prefab/ESpirits_Float.prefab
  4. 1 0
      ActionTowerDefense/Assets/Resources/Prefab/ESpirits_Invisible.prefab
  5. 6 2
      ActionTowerDefense/Assets/Resources/Prefab/Enemy_Arrow.prefab
  6. 6 2
      ActionTowerDefense/Assets/Resources/Prefab/Enemy_Giant.prefab
  7. 6 2
      ActionTowerDefense/Assets/Resources/Prefab/Enemy_Sword.prefab
  8. 15 9
      ActionTowerDefense/Assets/Resources/Prefab/FX/FollowSoulEffect.prefab
  9. 1 0
      ActionTowerDefense/Assets/Resources/Prefab/Transfiguration/Trans_Invisible.prefab
  10. 1 1
      ActionTowerDefense/Assets/Resources/Spine/Spirits_Assassin/Spirits_Assassin_Material_Outline 1.mat
  11. 1 1
      ActionTowerDefense/Assets/Resources/Spine/Spirits_Cook/Spirits_Cook_Material-Additive_Outline 1.mat
  12. 1 1
      ActionTowerDefense/Assets/Resources/Spine/Spirits_Cook/Spirits_Cook_Material_Outline 1.mat
  13. 1 1
      ActionTowerDefense/Assets/Resources/Spine/demon_arrow/demon_arrow_Material_Outline 1.mat
  14. 1 1
      ActionTowerDefense/Assets/Resources/Spine/demon_giant/demon_diant_Material_Outline 1.mat
  15. 1 1
      ActionTowerDefense/Assets/Resources/Spine/demon_sword/demon_sword_Material_Outline 1.mat
  16. 1 1
      ActionTowerDefense/Assets/Resources/Spine/spirits_float/Spirits_Float_Material-Additive_Outline 1.mat
  17. 1 1
      ActionTowerDefense/Assets/Resources/Spine/spirits_float/Spirits_Float_Material_Outline 1.mat
  18. 5 0
      ActionTowerDefense/Assets/Scripts/Enemy.cs
  19. 47 7
      ActionTowerDefense/Assets/Scripts/MoveCharacter.cs
  20. 13 8
      ActionTowerDefense/Assets/Scripts/Spirits/SoulBoom.cs
  21. 4 2
      ActionTowerDefense/Assets/Scripts/Spirits/Trans_Invisible.cs

+ 6 - 2
ActionTowerDefense/Assets/Resources/Prefab/ESpirits_Assassin.prefab

@@ -275,6 +275,8 @@ MonoBehaviour:
   hasHpUp: 0
   beLarger: 0
   attackToFloat: 0
+  isSoulUnstable: 0
+  soulUnstableTime: 0
   canMove: 1
   foot: {fileID: 2437299196663985756}
   extraRiseGravity: -28.8
@@ -310,6 +312,8 @@ MonoBehaviour:
   mats: []
   outlineMats:
   - {fileID: 2100000, guid: eb0e26c1a9cf9a14799273e742b98d21, type: 2}
+  outline1Mats:
+  - {fileID: 2100000, guid: c0377aa9339c7e24b94d247d135c8875, type: 2}
   playerMe: {fileID: 0}
   playerAni: {fileID: 0}
   playerCol: {fileID: 0}
@@ -324,6 +328,8 @@ MonoBehaviour:
   playerOut: []
   isInvisible: 0
   canNotChangeHurt: 0
+  soulPrefab: {fileID: 1723151111827507807, guid: e2b65aa482f2f1447a4074208d72b778, type: 3}
+  soulStartSpeed: 1
   id: 0
   jumpSpeed: 9
   searchState: 0
@@ -340,8 +346,6 @@ MonoBehaviour:
   minMoveSpeed: 15
   runSpeed: 0
   dropSoul: 3
-  soulPrefab: {fileID: 1723151111827507807, guid: e2b65aa482f2f1447a4074208d72b778, type: 3}
-  soulStartSpeed: 1
   dropSoulAngle: 90
   noOnSearchState: 0
   isFindingPlayer: 0

+ 3 - 1
ActionTowerDefense/Assets/Resources/Prefab/ESpirits_Cook.prefab

@@ -907,7 +907,9 @@ MonoBehaviour:
   outlineMats:
   - {fileID: 2100000, guid: 30969c92738eb7d4da3885e08f1ec2f0, type: 2}
   - {fileID: 2100000, guid: 98fc94309ab120b4c83b2cebb9226222, type: 2}
-  outline1Mats: []
+  outline1Mats:
+  - {fileID: 2100000, guid: 29ff9a6abfa104b479ba1b83d927d484, type: 2}
+  - {fileID: 2100000, guid: 10086c4b51acddf48b22318a9f8f6c7b, type: 2}
   playerMe: {fileID: 0}
   playerAni: {fileID: 0}
   playerCol: {fileID: 0}

+ 8 - 2
ActionTowerDefense/Assets/Resources/Prefab/ESpirits_Float.prefab

@@ -1072,6 +1072,8 @@ MonoBehaviour:
   hasHpUp: 0
   beLarger: 0
   attackToFloat: 0
+  isSoulUnstable: 0
+  soulUnstableTime: 0
   canMove: 1
   foot: {fileID: 8639832132450015562}
   extraRiseGravity: -28.8
@@ -1109,6 +1111,10 @@ MonoBehaviour:
   - {fileID: 2100000, guid: b89f4b5b01e92784ab27611e2b014a10, type: 2}
   - {fileID: 2100000, guid: 0d24ea357a09df448b788aed95b96541, type: 2}
   - {fileID: 2100000, guid: b89f4b5b01e92784ab27611e2b014a10, type: 2}
+  outline1Mats:
+  - {fileID: 2100000, guid: 648084fec8d73b041b2b71e496093462, type: 2}
+  - {fileID: 2100000, guid: bf37c470b67b1de4f9019b086d9baaa4, type: 2}
+  - {fileID: 2100000, guid: b89f4b5b01e92784ab27611e2b014a10, type: 2}
   playerMe: {fileID: 0}
   playerAni: {fileID: 0}
   playerCol: {fileID: 0}
@@ -1123,6 +1129,8 @@ MonoBehaviour:
   playerOut: []
   isInvisible: 0
   canNotChangeHurt: 0
+  soulPrefab: {fileID: 1723151111827507807, guid: e2b65aa482f2f1447a4074208d72b778, type: 3}
+  soulStartSpeed: 1
   id: 0
   jumpSpeed: 10
   searchState: 0
@@ -1139,8 +1147,6 @@ MonoBehaviour:
   minMoveSpeed: 8
   runSpeed: 0
   dropSoul: 3
-  soulPrefab: {fileID: 1723151111827507807, guid: e2b65aa482f2f1447a4074208d72b778, type: 3}
-  soulStartSpeed: 1
   dropSoulAngle: 90
   noOnSearchState: 0
   isFindingPlayer: 0

+ 1 - 0
ActionTowerDefense/Assets/Resources/Prefab/ESpirits_Invisible.prefab

@@ -315,6 +315,7 @@ MonoBehaviour:
   mesh: {fileID: 0}
   mats: []
   outlineMats: []
+  outline1Mats: []
   playerMe: {fileID: 0}
   playerAni: {fileID: 0}
   playerCol: {fileID: 0}

+ 6 - 2
ActionTowerDefense/Assets/Resources/Prefab/Enemy_Arrow.prefab

@@ -1033,6 +1033,8 @@ MonoBehaviour:
   hasHpUp: 0
   beLarger: 0
   attackToFloat: 0
+  isSoulUnstable: 0
+  soulUnstableTime: 0
   canMove: 1
   foot: {fileID: 8639832132450015562}
   extraRiseGravity: -28.8
@@ -1068,6 +1070,8 @@ MonoBehaviour:
   mats: []
   outlineMats:
   - {fileID: 2100000, guid: b634d447d9a02a14abc964532eedfc35, type: 2}
+  outline1Mats:
+  - {fileID: 2100000, guid: 916bb121eaeae3b43914636f946abdcd, type: 2}
   playerMe: {fileID: 0}
   playerAni: {fileID: 0}
   playerCol: {fileID: 0}
@@ -1082,6 +1086,8 @@ MonoBehaviour:
   playerOut: []
   isInvisible: 0
   canNotChangeHurt: 0
+  soulPrefab: {fileID: 1723151111827507807, guid: e2b65aa482f2f1447a4074208d72b778, type: 3}
+  soulStartSpeed: 1
   id: 0
   jumpSpeed: 10
   searchState: 0
@@ -1098,8 +1104,6 @@ MonoBehaviour:
   minMoveSpeed: 8
   runSpeed: 0
   dropSoul: 1
-  soulPrefab: {fileID: 1723151111827507807, guid: e2b65aa482f2f1447a4074208d72b778, type: 3}
-  soulStartSpeed: 1
   dropSoulAngle: 90
   noOnSearchState: 0
   isFindingPlayer: 0

+ 6 - 2
ActionTowerDefense/Assets/Resources/Prefab/Enemy_Giant.prefab

@@ -485,6 +485,8 @@ MonoBehaviour:
   hasHpUp: 0
   beLarger: 0
   attackToFloat: 0
+  isSoulUnstable: 0
+  soulUnstableTime: 0
   canMove: 1
   foot: {fileID: 5440846222604650418}
   extraRiseGravity: -28.8
@@ -520,6 +522,8 @@ MonoBehaviour:
   mats: []
   outlineMats:
   - {fileID: 2100000, guid: a30e0c3d2b8bf4e43a76fc2d5b3884cd, type: 2}
+  outline1Mats:
+  - {fileID: 2100000, guid: 82f4327af6aa844459ee45d1f72de829, type: 2}
   playerMe: {fileID: 0}
   playerAni: {fileID: 0}
   playerCol: {fileID: 0}
@@ -534,6 +538,8 @@ MonoBehaviour:
   playerOut: []
   isInvisible: 0
   canNotChangeHurt: 0
+  soulPrefab: {fileID: 1723151111827507807, guid: e2b65aa482f2f1447a4074208d72b778, type: 3}
+  soulStartSpeed: 1
   id: 0
   jumpSpeed: 10
   searchState: 0
@@ -550,8 +556,6 @@ MonoBehaviour:
   minMoveSpeed: 1
   runSpeed: 0
   dropSoul: 6
-  soulPrefab: {fileID: 1723151111827507807, guid: e2b65aa482f2f1447a4074208d72b778, type: 3}
-  soulStartSpeed: 1
   dropSoulAngle: 90
   noOnSearchState: 0
   isFindingPlayer: 0

+ 6 - 2
ActionTowerDefense/Assets/Resources/Prefab/Enemy_Sword.prefab

@@ -280,6 +280,8 @@ MonoBehaviour:
   hasHpUp: 0
   beLarger: 0
   attackToFloat: 0
+  isSoulUnstable: 0
+  soulUnstableTime: 0
   canMove: 1
   foot: {fileID: 2437299196663985756}
   extraRiseGravity: -28.8
@@ -315,6 +317,8 @@ MonoBehaviour:
   mats: []
   outlineMats:
   - {fileID: 2100000, guid: 7d50f910288e95b4285a5fb549c94fe6, type: 2}
+  outline1Mats:
+  - {fileID: 2100000, guid: 79dada70fee9fbc49a327168481d3def, type: 2}
   playerMe: {fileID: 0}
   playerAni: {fileID: 0}
   playerCol: {fileID: 0}
@@ -329,6 +333,8 @@ MonoBehaviour:
   playerOut: []
   isInvisible: 0
   canNotChangeHurt: 0
+  soulPrefab: {fileID: 1723151111827507807, guid: e2b65aa482f2f1447a4074208d72b778, type: 3}
+  soulStartSpeed: 1
   id: 0
   jumpSpeed: 9
   searchState: 0
@@ -345,8 +351,6 @@ MonoBehaviour:
   minMoveSpeed: 5
   runSpeed: 0
   dropSoul: 2
-  soulPrefab: {fileID: 1723151111827507807, guid: e2b65aa482f2f1447a4074208d72b778, type: 3}
-  soulStartSpeed: 1
   dropSoulAngle: 90
   noOnSearchState: 0
   isFindingPlayer: 0

+ 15 - 9
ActionTowerDefense/Assets/Resources/Prefab/FX/FollowSoulEffect.prefab

@@ -151772,7 +151772,7 @@ GameObject:
   - component: {fileID: 1135045849482944710}
   - component: {fileID: 4201428945599059759}
   - component: {fileID: 2865685094821105927}
-  - component: {fileID: 7763221237502440034}
+  - component: {fileID: 675708803888164897}
   m_Layer: 0
   m_Name: SoulBoom (1)
   m_TagString: Untagged
@@ -151812,7 +151812,7 @@ MonoBehaviour:
   boomTime: 2.1
   isBoom: 0
   attackInfo:
-    damage: 400
+    damage: 200
     attackDir: {x: 2, y: 2, z: 0}
     force: 5000
     changeHurt: 1
@@ -151820,6 +151820,8 @@ MonoBehaviour:
   destroyTime: 5
   characters: []
   isTransfiguration: 1
+  soulUnstableTime: 10
+  parent: {fileID: 0}
 --- !u!54 &2865685094821105927
 Rigidbody:
   m_ObjectHideFlags: 0
@@ -151836,8 +151838,8 @@ Rigidbody:
   m_Interpolate: 0
   m_Constraints: 126
   m_CollisionDetection: 0
---- !u!135 &7763221237502440034
-SphereCollider:
+--- !u!136 &675708803888164897
+CapsuleCollider:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
   m_PrefabInstance: {fileID: 0}
@@ -151846,8 +151848,9 @@ SphereCollider:
   m_Material: {fileID: 0}
   m_IsTrigger: 1
   m_Enabled: 0
-  serializedVersion: 2
   m_Radius: 8
+  m_Height: 36
+  m_Direction: 2
   m_Center: {x: 0, y: 0.46, z: 0}
 --- !u!1 &7974523266980730195
 GameObject:
@@ -151860,7 +151863,7 @@ GameObject:
   - component: {fileID: 2092692723381186522}
   - component: {fileID: 3300381806182711281}
   - component: {fileID: 923046814478230668}
-  - component: {fileID: 7633755703306407850}
+  - component: {fileID: 1941026302825291053}
   m_Layer: 0
   m_Name: SoulBoom
   m_TagString: Untagged
@@ -151908,6 +151911,8 @@ MonoBehaviour:
   destroyTime: 5
   characters: []
   isTransfiguration: 0
+  soulUnstableTime: 0
+  parent: {fileID: 0}
 --- !u!54 &923046814478230668
 Rigidbody:
   m_ObjectHideFlags: 0
@@ -151924,8 +151929,8 @@ Rigidbody:
   m_Interpolate: 0
   m_Constraints: 126
   m_CollisionDetection: 0
---- !u!135 &7633755703306407850
-SphereCollider:
+--- !u!136 &1941026302825291053
+CapsuleCollider:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
   m_PrefabInstance: {fileID: 0}
@@ -151934,6 +151939,7 @@ SphereCollider:
   m_Material: {fileID: 0}
   m_IsTrigger: 1
   m_Enabled: 0
-  serializedVersion: 2
   m_Radius: 8
+  m_Height: 36
+  m_Direction: 2
   m_Center: {x: 0, y: 0.46, z: 0}

+ 1 - 0
ActionTowerDefense/Assets/Resources/Prefab/Transfiguration/Trans_Invisible.prefab

@@ -330,6 +330,7 @@ MonoBehaviour:
   mesh: {fileID: 0}
   mats: []
   outlineMats: []
+  outline1Mats: []
   playerMe: {fileID: 0}
   playerAni: {fileID: 0}
   playerCol: {fileID: 0}

+ 1 - 1
ActionTowerDefense/Assets/Resources/Spine/Spirits_Assassin/Spirits_Assassin_Material_Outline 1.mat

@@ -39,5 +39,5 @@ Material:
     - _ThresholdEnd: 0.25
     - _Use8Neighbourhood: 1
     m_Colors:
-    - _OutlineColor: {r: 1, g: 1, b: 0, a: 1}
+    - _OutlineColor: {r: 0, g: 1, b: 0, a: 1}
   m_BuildTextureStacks: []

+ 1 - 1
ActionTowerDefense/Assets/Resources/Spine/Spirits_Cook/Spirits_Cook_Material-Additive_Outline 1.mat

@@ -46,5 +46,5 @@ Material:
     m_Colors:
     - <noninit>: {r: 0, g: 2.018574, b: 1e-45, a: 0.000007110106}
     - _Color: {r: 1, g: 1, b: 1, a: 1}
-    - _OutlineColor: {r: 1, g: 1, b: 0, a: 1}
+    - _OutlineColor: {r: 0, g: 1, b: 0, a: 1}
   m_BuildTextureStacks: []

+ 1 - 1
ActionTowerDefense/Assets/Resources/Spine/Spirits_Cook/Spirits_Cook_Material_Outline 1.mat

@@ -39,5 +39,5 @@ Material:
     - _ThresholdEnd: 0.25
     - _Use8Neighbourhood: 1
     m_Colors:
-    - _OutlineColor: {r: 1, g: 1, b: 0, a: 1}
+    - _OutlineColor: {r: 0, g: 1, b: 0, a: 1}
   m_BuildTextureStacks: []

+ 1 - 1
ActionTowerDefense/Assets/Resources/Spine/demon_arrow/demon_arrow_Material_Outline 1.mat

@@ -86,7 +86,7 @@ Material:
     - _EmissionColor: {r: 0, g: 0, b: 0, a: 0}
     - _FillColor: {r: 1, g: 1, b: 1, a: 1}
     - _FixedNormal: {r: 0, g: 0, b: 1, a: 1}
-    - _OutlineColor: {r: 1, g: 1, b: 0, a: 1}
+    - _OutlineColor: {r: 0, g: 1, b: 0, a: 1}
     - _OverlayColor: {r: 0, g: 0, b: 0, a: 0}
     - _RimColor: {r: 1, g: 1, b: 1, a: 1}
   m_BuildTextureStacks: []

+ 1 - 1
ActionTowerDefense/Assets/Resources/Spine/demon_giant/demon_diant_Material_Outline 1.mat

@@ -39,5 +39,5 @@ Material:
     - _ThresholdEnd: 0.1
     - _Use8Neighbourhood: 1
     m_Colors:
-    - _OutlineColor: {r: 1, g: 1, b: 0, a: 1}
+    - _OutlineColor: {r: 0, g: 1, b: 0, a: 1}
   m_BuildTextureStacks: []

+ 1 - 1
ActionTowerDefense/Assets/Resources/Spine/demon_sword/demon_sword_Material_Outline 1.mat

@@ -39,5 +39,5 @@ Material:
     - _ThresholdEnd: 0.1
     - _Use8Neighbourhood: 1
     m_Colors:
-    - _OutlineColor: {r: 1, g: 1, b: 0, a: 0.003921569}
+    - _OutlineColor: {r: 0, g: 1, b: 0, a: 0.003921569}
   m_BuildTextureStacks: []

+ 1 - 1
ActionTowerDefense/Assets/Resources/Spine/spirits_float/Spirits_Float_Material-Additive_Outline 1.mat

@@ -46,5 +46,5 @@ Material:
     m_Colors:
     - <noninit>: {r: 0, g: 2.018574, b: 1e-45, a: 0.000007110106}
     - _Color: {r: 1, g: 1, b: 1, a: 1}
-    - _OutlineColor: {r: 1, g: 1, b: 0, a: 1}
+    - _OutlineColor: {r: 0, g: 1, b: 0, a: 1}
   m_BuildTextureStacks: []

+ 1 - 1
ActionTowerDefense/Assets/Resources/Spine/spirits_float/Spirits_Float_Material_Outline 1.mat

@@ -39,5 +39,5 @@ Material:
     - _ThresholdEnd: 0.25
     - _Use8Neighbourhood: 1
     m_Colors:
-    - _OutlineColor: {r: 1, g: 1, b: 0, a: 1}
+    - _OutlineColor: {r: 0, g: 1, b: 0, a: 1}
   m_BuildTextureStacks: []

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

@@ -465,6 +465,10 @@ public class Enemy : MoveCharacter
                             break;
                         }
                     }
+                    if(targetCharacter == null)
+                    {
+                        ChosePlayer();
+                    }
                     if (Mathf.Abs(transform.position.x-targetCharacter.transform.position.x)
                         < hateDistance)
                     {
@@ -595,6 +599,7 @@ public class Enemy : MoveCharacter
                 isDie = false;
                 break;
             case CharacterState.Weak:
+
                 break;
             case CharacterState.Float:
                 canMove = true;

+ 47 - 7
ActionTowerDefense/Assets/Scripts/MoveCharacter.cs

@@ -112,21 +112,59 @@ public class MoveCharacter : Character
         curFallSpeed = normalFallSpeed;
     }
 
-    private void ChangeMat(int state)
+    //0:漂浮 1:正常 2:灵魂不稳定
+    public void ChangeMat(int state)
     {
+        if(outline1Mats.Length == 0)
+        {
+            Transform particleSystem = bodyTrans.GetChild(1).GetChild(0);
+            if (particleSystem == null)
+            {
+                return;
+            }
+            ParticleSystem.MainModule mainModule;
+            switch (state)
+            {
+                case 0:
+                    break;
+                case 1:
+                    mainModule =
+                        particleSystem.GetChild(1).GetComponent<ParticleSystem>().main;
+                    mainModule.startColor = new ParticleSystem.MinMaxGradient(Color.white);
+                    mainModule =
+                        particleSystem.GetChild(2).GetComponent<ParticleSystem>().main;
+                    mainModule.startColor = new ParticleSystem.MinMaxGradient(Color.white);
+                    break;
+                case 2:
+                    mainModule =
+                        particleSystem.GetChild(1).GetComponent<ParticleSystem>().main;
+                    mainModule.startColor = new ParticleSystem.MinMaxGradient(Color.yellow);
+                    mainModule =
+                        particleSystem.GetChild(2).GetComponent<ParticleSystem>().main;
+                    mainModule.startColor = new ParticleSystem.MinMaxGradient(Color.yellow);
+                    break;
+                default:
+                    break;
+            }
+            return;
+        }
         if (spinee == null || mesh == null || mats == null)
         {
             spinee = transform.GetChild(0).GetChild(0).gameObject;
             mesh = spinee.GetComponent<MeshRenderer>();
             mats = mesh.materials;
         }
-        if (state == 0)
+        switch (state)
         {
-            mesh.materials = outlineMats;
-        }
-        else
-        {
-            mesh.materials = mats;
+            case 0:
+                mesh.materials = outlineMats;
+                break;
+            case 1:
+                mesh.materials = mats;
+                break;
+            case 2:
+                mesh.materials = outline1Mats;
+                break;
         }
     }
 
@@ -275,9 +313,11 @@ public class MoveCharacter : Character
         if (isSoulUnstable)
         {
             soulUnstableTime -= Time.deltaTime;
+            ChangeMat(2);
             if(soulUnstableTime < 0)
             {
                 isSoulUnstable = false;
+                ChangeMat(1);
             }
         }
     }

+ 13 - 8
ActionTowerDefense/Assets/Scripts/Spirits/SoulBoom.cs

@@ -11,7 +11,7 @@ public class SoulBoom : MonoBehaviour
     public bool isBoom;
     public AttackInfo attackInfo;
     public float destroyTime;
-    public List<Character> characters = new List<Character>();
+    public List<MoveCharacter> characters = new List<MoveCharacter>();
     public bool isTransfiguration;
     public float soulUnstableTime;
     public Transform parent;
@@ -51,12 +51,17 @@ public class SoulBoom : MonoBehaviour
                             target = new Vector3(-attackInfo.attackDir.x, attackInfo.attackDir.y,
                                 attackInfo.attackDir.z);
                         }
-                        characters[i].isSoulUnstable = true;
-                        characters[i].soulUnstableTime = soulUnstableTime;
+
+                        
                         characters[i].BeHit
                             (attackInfo.damage, target * attackInfo.force,
                             attackInfo.changeHurt, attackInfo.repelValue);
-
+                        if (isTransfiguration)
+                        {
+                            characters[i].isSoulUnstable = true;
+                            characters[i].soulUnstableTime = soulUnstableTime;
+                            characters[i].ChangeMat(2);
+                        }
 
                     }
 
@@ -74,7 +79,7 @@ public class SoulBoom : MonoBehaviour
         if (!isTransfiguration && (other.gameObject.layer == 6 || other.gameObject.layer == 7)
             && other.name == "BodyCollider")
         {
-            Character character = other.GetComponentInParent<Character>();
+            MoveCharacter character = other.GetComponentInParent<MoveCharacter>();
             if (!characters.Exists(t => t == character))
             {
                 characters.Add(character);
@@ -84,7 +89,7 @@ public class SoulBoom : MonoBehaviour
         if (isTransfiguration && other.gameObject.layer == 8
             && other.name == "BodyCollider")
         {
-            Character character = other.GetComponentInParent<Character>();
+            MoveCharacter character = other.GetComponentInParent<MoveCharacter>();
             if (!characters.Exists(t => t == character))
             {
                 
@@ -97,7 +102,7 @@ public class SoulBoom : MonoBehaviour
         if (!isTransfiguration && (other.gameObject.layer == 6 || other.gameObject.layer == 7)
             && other.name == "BodyCollider")
         {
-            Character character = other.GetComponentInParent<Character>();
+            MoveCharacter character = other.GetComponentInParent<MoveCharacter>();
             if (characters.Exists(t => t == character))
             {
                 characters.Remove(character);
@@ -106,7 +111,7 @@ public class SoulBoom : MonoBehaviour
         if (isTransfiguration && other.gameObject.layer == 8
             && other.name == "BodyCollider")
         {
-            Character character = other.GetComponentInParent<Character>();
+            MoveCharacter character = other.GetComponentInParent<MoveCharacter>();
             if (characters.Exists(t => t == character))
             {
                 characters.Remove(character);

+ 4 - 2
ActionTowerDefense/Assets/Scripts/Spirits/Trans_Invisible.cs

@@ -64,9 +64,9 @@ public class Trans_Invisible : MonoBehaviour
                 soulFollowEffect.ShowSouls(soulCollector.soulNumbers);
                 AttackJ();
             }
-            else if(playerController.mp>=10)
+            else if(playerController.mp>= soulPrefab.GetComponent<Soul>().addMp)
             {
-                playerController.mp -= 10;
+                playerController.mp -= soulPrefab.GetComponent<Soul>().addMp;
                 AttackJ();
             }
             
@@ -108,6 +108,8 @@ public class Trans_Invisible : MonoBehaviour
     public void BackToPlayer()
     {
         playerController.ani.Play("fall",0,0);
+        playerController.mp += soulCollector.soulNumbers * soulPrefab.GetComponent<Soul>().addMp;
+        soulCollector.soulNumbers = 0;
     }
     void AttackJ()
     {