Эх сурвалжийг харах

修改吃魂特效位置,移到魂身上

SZAND\msx_2 3 сар өмнө
parent
commit
07148e3112

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

@@ -9844,6 +9844,7 @@ MonoBehaviour:
   to: {x: 0, y: 0, z: 0}
   time: 0
   Spirits_Invisible_NotFind: 0
+  getSoulEffect: {fileID: 417478504669294145, guid: 52bda3734b3e7614fb25823d1bfe8e7d, type: 3}
   isSourPurple: 0
   type: 0
   spiritSystem: {fileID: 0}

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

@@ -44,7 +44,6 @@ public class PlayerController : MoveCharacter
     public float lostMp;
     public float addMp = 10;
     public GameObject soul;
-    public GameObject GetSoulEffect;
     public GameObject rapidReplyEffect;
     [Tooltip("场上每多一个同种类兵种,召唤兵种蓝耗+x")] public float[] addCostMp;
 

+ 3 - 1
ActionTowerDefense/Assets/Scripts/Soul.cs

@@ -26,6 +26,9 @@ public class Soul : MonoBehaviour
 
     public bool Spirits_Invisible_NotFind;
 
+    [Header("吃魂特效")]
+    public GameObject getSoulEffect;
+
     [Header("紫魂")]
     public bool isSourPurple;           //是否是紫魂
     public Spirits.SpiritType type;
@@ -64,7 +67,6 @@ public class Soul : MonoBehaviour
                     }
                 }
             }
-
         }
         collected = true;
         GetComponent<BoxCollider>().enabled = false;

+ 1 - 1
ActionTowerDefense/Assets/Scripts/SoulCollector.cs

@@ -21,7 +21,7 @@ public class SoulCollector : MonoBehaviour
                 player = GetComponentInParent<PlayerController>();
             }
             soul.BeCollect(player.playerId);
-            PoolManager.Instantiate(player.GetSoulEffect, player.bodyTrans.position);
+            PoolManager.Instantiate(soul.getSoulEffect, other.bounds.ClosestPoint(transform.position));
         }
     }
 }