Explorar o código

变身隐身周围的魂预制体逻辑切换

LAPTOP-OM1V99U2\永远de小亡灵 hai 1 ano
pai
achega
d7e97b6cc9

+ 6 - 8
ActionTowerDefense/Assets/Resources/Prefab/ESpirits_Invisible.prefab

@@ -747,12 +747,10 @@ MonoBehaviour:
   angle: 0
   soulsNumber: 0
   rotateSpeed: 90
-  soul: {fileID: 2790126111997635467}
+  soul: {fileID: 1891440660381530207}
   eSpirits: {fileID: 3269304469610989911}
   soulsList: []
   distance: 1.5
-  boomTime: 3
-  destroyTime: 3
   isTransfiguration: 0
   KBoomSoulTime: 0
   soulBoom: {fileID: 2061548984477852820}
@@ -1250,6 +1248,11 @@ PrefabInstance:
       objectReference: {fileID: 0}
     m_RemovedComponents: []
   m_SourcePrefab: {fileID: 100100000, guid: a956ce2c24a9a8b4b98cbf27ef623367, type: 3}
+--- !u!1 &1891440660381530207 stripped
+GameObject:
+  m_CorrespondingSourceObject: {fileID: 3129693219121881914, guid: a956ce2c24a9a8b4b98cbf27ef623367, type: 3}
+  m_PrefabInstance: {fileID: 3553718495943334757}
+  m_PrefabAsset: {fileID: 0}
 --- !u!114 &2061548984477852820 stripped
 MonoBehaviour:
   m_CorrespondingSourceObject: {fileID: 3300381806182711281, guid: a956ce2c24a9a8b4b98cbf27ef623367, type: 3}
@@ -1261,11 +1264,6 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: a7ca44b9cabcdeb4bb198cc532b04e86, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
---- !u!1 &2790126111997635467 stripped
-GameObject:
-  m_CorrespondingSourceObject: {fileID: 1723151111081767150, guid: a956ce2c24a9a8b4b98cbf27ef623367, type: 3}
-  m_PrefabInstance: {fileID: 3553718495943334757}
-  m_PrefabAsset: {fileID: 0}
 --- !u!4 &2790126112879694142 stripped
 Transform:
   m_CorrespondingSourceObject: {fileID: 1723151111827507803, guid: a956ce2c24a9a8b4b98cbf27ef623367, type: 3}

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 228 - 224
ActionTowerDefense/Assets/Resources/Prefab/FX/FollowSoulEffect.prefab


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

@@ -210,7 +210,6 @@ MonoBehaviour:
   demonic: {fileID: 2437299196472462353}
   player: {fileID: 0}
   playerController: {fileID: 0}
-  changeTime: 30
   addMp: 100
   soulCollector: {fileID: 1289604965499631171}
   soulPrefab: {fileID: 1723151111827507807, guid: e2b65aa482f2f1447a4074208d72b778, type: 3}
@@ -227,6 +226,9 @@ MonoBehaviour:
   magnification: 0.5
   firstScale: 0.5
   addScaleMagnification: 0.5
+  boomTime: 1
+  addBoomTime: 1
+  maxBoomTime: 10
 --- !u!114 &2437299196472462353
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -1227,12 +1229,10 @@ MonoBehaviour:
   angle: 0
   soulsNumber: 0
   rotateSpeed: 90
-  soul: {fileID: 2465817539514729491}
+  soul: {fileID: 2215608650533722055}
   eSpirits: {fileID: 0}
   soulsList: []
   distance: 1.5
-  boomTime: 3
-  destroyTime: 3
   isTransfiguration: 1
   KBoomSoulTime: -100
   soulBoom: {fileID: 1125884991471150034}
@@ -1314,9 +1314,9 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: a7ca44b9cabcdeb4bb198cc532b04e86, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
---- !u!1 &2465817539514729491 stripped
+--- !u!1 &2215608650533722055 stripped
 GameObject:
-  m_CorrespondingSourceObject: {fileID: 1723151111081767150, guid: a956ce2c24a9a8b4b98cbf27ef623367, type: 3}
+  m_CorrespondingSourceObject: {fileID: 3129693219121881914, guid: a956ce2c24a9a8b4b98cbf27ef623367, type: 3}
   m_PrefabInstance: {fileID: 3878033803522684157}
   m_PrefabAsset: {fileID: 0}
 --- !u!4 &2465817539840671398 stripped

+ 0 - 48
ActionTowerDefense/Assets/Scripts/Spirits/SoulBoom.cs

@@ -45,54 +45,6 @@ public class SoulBoom : MonoBehaviour
                         Vector3 pos1 = characters[i].transform.position;
                         Vector3 pos2 = transform.position;
                         target = (pos1 - pos2).normalized;
-                        //if (pos1.x > pos2.x)
-                        //{
-                        //    if (pos1.y > pos2.y)
-                        //    {
-                        //        target = new Vector3(attackInfo.attackDir.x, attackInfo.attackDir.y,0);
-                        //    }
-                        //    else if(pos1.y < pos2.y)
-                        //    {
-                        //        target = new Vector3(attackInfo.attackDir.x, -attackInfo.attackDir.y,0);
-
-                        //    }
-                        //    else
-                        //    {
-                        //        target = new Vector3(attackInfo.attackDir.x, 0,0);
-                        //    }
-                        //}
-                        //else if(pos1.x < pos2.x)
-                        //{
-                        //    if(pos1.y > pos2.y)
-                        //    {
-                        //        target = new Vector3(-attackInfo.attackDir.x, attackInfo.attackDir.y, 0);
-                        //    }
-                        //    else if(pos1.y < pos2.y)
-                        //    {
-                        //        target = new Vector3(-attackInfo.attackDir.x, -attackInfo.attackDir.y, 0);
-                        //    }
-                        //    else
-                        //    {
-                        //        target = new Vector3(-attackInfo.attackDir.x, 0, 0);
-                        //    }
-
-                        //}
-                        //else
-                        //{
-                        //    if (pos1.y > pos2.y)
-                        //    {
-                        //        target = new Vector3(0, attackInfo.attackDir.y, 0);
-                        //    }
-                        //    else if (pos1.y < pos2.y)
-                        //    {
-                        //        target = new Vector3(0, -attackInfo.attackDir.y, 0);
-                        //    }
-                        //    else
-                        //    {
-                        //        target = new Vector3(0, 0, 0);
-                        //    }
-
-                        //}
 
                         
                         characters[i].BeHit

+ 4 - 11
ActionTowerDefense/Assets/Scripts/Spirits/SoulFollowEffect.cs

@@ -13,8 +13,6 @@ public class SoulFollowEffect : MonoBehaviour
     [HideInInspector]
     public List<GameObject> soulsList = new List<GameObject>();
     public float distance;
-    public float boomTime;
-    public float destroyTime;
     public bool isTransfiguration;
     public float KBoomSoulTime;
     public SoulBoom soulBoom;
@@ -36,7 +34,6 @@ public class SoulFollowEffect : MonoBehaviour
                 soulsList.Add(newSoul);
             }
         }
-
     }
     private void Update()
     {
@@ -150,19 +147,15 @@ public class SoulFollowEffect : MonoBehaviour
     }
     public void SoulChangeColor(int id,bool isRed)
     {
-        ParticleSystem.MainModule mainModule =
-            soulsList[id].GetComponent<ParticleSystem>().main;
-        ParticleSystem.MainModule mainModule1=
-            soulsList[id].transform.GetChild(0).GetComponent<ParticleSystem>().main;
         if (isRed)
         {
-            mainModule.startColor = new ParticleSystem.MinMaxGradient(Color.red);
-            mainModule1.startColor = new ParticleSystem.MinMaxGradient(Color.red);
+            soulsList[id].transform.GetChild(0).gameObject.SetActive(false);
+            soulsList[id].transform.GetChild(1).gameObject.SetActive(true);
         }
         else
         {
-            mainModule.startColor = new ParticleSystem.MinMaxGradient(Color.white);
-            mainModule1.startColor = new ParticleSystem.MinMaxGradient(Color.white);
+            soulsList[id].transform.GetChild(1).gameObject.SetActive(false);
+            soulsList[id].transform.GetChild(0).gameObject.SetActive(true);
         }
     }
 }

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

@@ -30,6 +30,9 @@ public class Trans_Invisible : MonoBehaviour
     public float magnification;
     public float firstScale;
     public float addScaleMagnification;
+    public float boomTime;
+    public float addBoomTime;
+    public float maxBoomTime;
 
 
     private void Start()
@@ -150,11 +153,15 @@ public class Trans_Invisible : MonoBehaviour
     {
         if(soulFollowEffect.boomSoulNumber == 0)
         {
-            soulFollowEffect.KBoomSoulTime = 3;
+            soulFollowEffect.KBoomSoulTime = boomTime;
         }
         else
         {
-            soulFollowEffect.KBoomSoulTime += 1;
+            soulFollowEffect.KBoomSoulTime += addBoomTime;
+            if(soulFollowEffect.KBoomSoulTime > maxBoomTime)
+            {
+                soulFollowEffect.KBoomSoulTime = maxBoomTime;
+            }
         }
         soulFollowEffect.boomSoulNumber++;
         soulFollowEffect.boomScale = 

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio