瀏覽代碼

变身隐身L键连续点击范围变大

LAPTOP-OM1V99U2\永远de小亡灵 1 年之前
父節點
當前提交
40857ccac6

File diff suppressed because it is too large
+ 286 - 323
ActionTowerDefense/Assets/Resources/Prefab/FX/FollowSoulEffect.prefab


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

@@ -223,6 +223,8 @@ MonoBehaviour:
   normalSpeed: 0
   kMp: 5
   magnification: 0.5
+  firstScale: 0.5
+  addScaleMagnification: 0.5
 --- !u!114 &2437299196472462353
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -1229,6 +1231,7 @@ MonoBehaviour:
   isBoom: 0
   boomSoulNumber: 0
   soulCollector: {fileID: 1289604965499631171}
+  boomScale: 0
 --- !u!1001 &1717720538502236081
 PrefabInstance:
   m_ObjectHideFlags: 0

+ 7 - 6
ActionTowerDefense/Assets/Scripts/Spirits/SoulFollowEffect.cs

@@ -22,6 +22,7 @@ public class SoulFollowEffect : MonoBehaviour
     public bool isBoom;
     public int boomSoulNumber;
     public InvisibleSoulCollector soulCollector;
+    public float boomScale;
     private void Awake()
     {
         if (!isTransfiguration)
@@ -83,7 +84,12 @@ public class SoulFollowEffect : MonoBehaviour
         if (isTransfiguration)
         {
             boomSoul.transform.parent = transform;
-            boomSoul.transform.GetChild(0).GetChild(2).gameObject.SetActive(false);
+            Transform bomb = boomSoul.transform.GetChild(0);
+            for (int i = 0; i < bomb.childCount; i++)
+            {
+                bomb.GetChild(i).localScale = Vector3.one * boomScale;
+            }
+            
         }
         
         boomSoul.SetActive(true);
@@ -155,10 +161,5 @@ public class SoulFollowEffect : MonoBehaviour
             mainModule.startColor = new ParticleSystem.MinMaxGradient(Color.white);
             mainModule1.startColor = new ParticleSystem.MinMaxGradient(Color.white);
         }
-        
-        
-        
-        
-
     }
 }

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

@@ -28,6 +28,8 @@ public class Trans_Invisible : MonoBehaviour
     public float normalSpeed;
     public float kMp;
     public float magnification;
+    public float firstScale;
+    public float addScaleMagnification;
 
 
     private void Start()
@@ -151,6 +153,8 @@ public class Trans_Invisible : MonoBehaviour
             soulFollowEffect.KBoomSoulTime += 1;
         }
         soulFollowEffect.boomSoulNumber++;
+        soulFollowEffect.boomScale = 
+            firstScale * Mathf.Pow(soulFollowEffect.boomSoulNumber, addScaleMagnification);
         soulFollowEffect.SoulChangeColor(soulFollowEffect.boomSoulNumber - 1,true);
         soulFollowEffect.isBooming = true;
     }

Some files were not shown because too many files changed in this diff