Преглед на файлове

变身隐身按L引爆身边的魂

LAPTOP-OM1V99U2\永远de小亡灵 преди 1 година
родител
ревизия
e8c33ed4ea

Файловите разлики са ограничени, защото са твърде много
+ 357 - 393
ActionTowerDefense/Assets/Resources/Prefab/FX/FollowSoulEffect.prefab


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

@@ -188,6 +188,7 @@ Transform:
   - {fileID: 2730232521377132808}
   - {fileID: 5061628209490452354}
   - {fileID: 4824124076759881995}
+  - {fileID: 17818087937920490}
   - {fileID: 8507731236713456294}
   m_Father: {fileID: 0}
   m_RootOrder: 0
@@ -318,6 +319,7 @@ MonoBehaviour:
   isFloat: 0
   normalFallSpeed: 10
   rapidFallSpeed: 30
+  curFallSpeed: 0
   floatState: 0
   spinee: {fileID: 0}
   mesh: {fileID: 0}
@@ -857,7 +859,7 @@ RectTransform:
   m_Children:
   - {fileID: 6098794361404217704}
   m_Father: {fileID: 2437299196472462364}
-  m_RootOrder: 4
+  m_RootOrder: 5
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
   m_AnchorMax: {x: 0, y: 0}
@@ -1219,6 +1221,89 @@ MonoBehaviour:
   boomTime: 3
   destroyTime: 3
   isTransfiguration: 1
+  KBoomSoulTime: -100
+  soulBoom: {fileID: 3285632007868534942}
+  isBooming: 0
+  isBoom: 0
+  boomSoulNumber: 0
+  soulCollector: {fileID: 1289604965499631171}
+--- !u!1001 &1717720538502236081
+PrefabInstance:
+  m_ObjectHideFlags: 0
+  serializedVersion: 2
+  m_Modification:
+    m_TransformParent: {fileID: 2437299196472462364}
+    m_Modifications:
+    - target: {fileID: 1723151111827507803, guid: a956ce2c24a9a8b4b98cbf27ef623367, type: 3}
+      propertyPath: m_RootOrder
+      value: 4
+      objectReference: {fileID: 0}
+    - target: {fileID: 1723151111827507803, guid: a956ce2c24a9a8b4b98cbf27ef623367, type: 3}
+      propertyPath: m_LocalPosition.x
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 1723151111827507803, guid: a956ce2c24a9a8b4b98cbf27ef623367, type: 3}
+      propertyPath: m_LocalPosition.y
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 1723151111827507803, guid: a956ce2c24a9a8b4b98cbf27ef623367, type: 3}
+      propertyPath: m_LocalPosition.z
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 1723151111827507803, guid: a956ce2c24a9a8b4b98cbf27ef623367, type: 3}
+      propertyPath: m_LocalRotation.w
+      value: 1
+      objectReference: {fileID: 0}
+    - target: {fileID: 1723151111827507803, guid: a956ce2c24a9a8b4b98cbf27ef623367, type: 3}
+      propertyPath: m_LocalRotation.x
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 1723151111827507803, guid: a956ce2c24a9a8b4b98cbf27ef623367, type: 3}
+      propertyPath: m_LocalRotation.y
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 1723151111827507803, guid: a956ce2c24a9a8b4b98cbf27ef623367, type: 3}
+      propertyPath: m_LocalRotation.z
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 1723151111827507803, guid: a956ce2c24a9a8b4b98cbf27ef623367, type: 3}
+      propertyPath: m_LocalEulerAnglesHint.x
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 1723151111827507803, guid: a956ce2c24a9a8b4b98cbf27ef623367, type: 3}
+      propertyPath: m_LocalEulerAnglesHint.y
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 1723151111827507803, guid: a956ce2c24a9a8b4b98cbf27ef623367, type: 3}
+      propertyPath: m_LocalEulerAnglesHint.z
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 1723151111827507807, guid: a956ce2c24a9a8b4b98cbf27ef623367, type: 3}
+      propertyPath: m_Name
+      value: FollowSoulEffect
+      objectReference: {fileID: 0}
+    - target: {fileID: 1723151111827507807, guid: a956ce2c24a9a8b4b98cbf27ef623367, type: 3}
+      propertyPath: m_IsActive
+      value: 0
+      objectReference: {fileID: 0}
+    m_RemovedComponents: []
+  m_SourcePrefab: {fileID: 100100000, guid: a956ce2c24a9a8b4b98cbf27ef623367, type: 3}
+--- !u!4 &17818087937920490 stripped
+Transform:
+  m_CorrespondingSourceObject: {fileID: 1723151111827507803, guid: a956ce2c24a9a8b4b98cbf27ef623367, type: 3}
+  m_PrefabInstance: {fileID: 1717720538502236081}
+  m_PrefabAsset: {fileID: 0}
+--- !u!114 &3285632007868534942 stripped
+MonoBehaviour:
+  m_CorrespondingSourceObject: {fileID: 4201428945599059759, guid: a956ce2c24a9a8b4b98cbf27ef623367, type: 3}
+  m_PrefabInstance: {fileID: 1717720538502236081}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 0}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: a7ca44b9cabcdeb4bb198cc532b04e86, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
 --- !u!1001 &7464584808883890403
 PrefabInstance:
   m_ObjectHideFlags: 0

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

@@ -16,6 +16,12 @@ public class SoulFollowEffect : MonoBehaviour
     public float boomTime;
     public float destroyTime;
     public bool isTransfiguration;
+    public float KBoomSoulTime;
+    public SoulBoom soulBoom;
+    public bool isBooming;
+    public bool isBoom;
+    public int boomSoulNumber;
+    public InvisibleSoulCollector soulCollector;
     private void Awake()
     {
         if (!isTransfiguration)
@@ -33,17 +39,53 @@ public class SoulFollowEffect : MonoBehaviour
     private void Update()
     {
         angle += Time.deltaTime * rotateSpeed;
-        if(angle >= 360)
+        
+
+        if (angle >= 360)
         {
             angle -= 360;
         }
         transform.rotation = Quaternion.Euler(new Vector3(0, 0, angle));
+        if(isBooming)
+        {
+            KBoomSoulTime -= Time.deltaTime;
+            if (KBoomSoulTime <= 0 && KBoomSoulTime > -soulBoom.boomTime)
+            {
+                if (!isBoom)
+                {
+                    isBoom = true;
+                    Boom();
+                }
+                
+            }
+            if (KBoomSoulTime <= -soulBoom.boomTime)
+            {
+                for (int i = 0; i < boomSoulNumber; i++)
+                {
+                    SoulChangeColor(i, false);
+                }
+                soulCollector.soulNumbers -= boomSoulNumber;
+                ShowSouls(soulsNumber - boomSoulNumber);
+                boomSoulNumber = 0;
+                isBoom = false;
+                isBooming = false;
+            }
+        }
+        
+
+
+
     }
     public void Boom()
     {
         GameObject boomSoul = Instantiate(soul.transform.GetChild(1).gameObject);
         boomSoul.transform.position = transform.position;
-        SoulBoom soulBoom = boomSoul.GetComponent<SoulBoom>();
+        if (isTransfiguration)
+        {
+            boomSoul.transform.parent = transform;
+            boomSoul.transform.GetChild(0).GetChild(2).gameObject.SetActive(false);
+        }
+
         boomSoul.SetActive(true);
     }
     public void ShowSouls(int newNumber)
@@ -63,9 +105,13 @@ public class SoulFollowEffect : MonoBehaviour
                 soulsList[i].gameObject.SetActive(false);
             }
         }
-        else if (newNumber > soulsNumber)
+        if (newNumber > soulsNumber)
         {
-            soulsList[newNumber - 1].gameObject.SetActive(true);
+            for(int i = soulsNumber; i < newNumber; i++)
+            {
+                soulsList[i].gameObject.SetActive(true);
+            }
+            
             float angle = 360f / newNumber;
             for (int i = 0; i < newNumber; i++)
             {
@@ -75,9 +121,13 @@ public class SoulFollowEffect : MonoBehaviour
             }
 
         }
-        else
+        if(newNumber < soulsNumber)
         {
-            soulsList[newNumber].gameObject.SetActive(false);
+            for(int i = newNumber;i<soulsNumber;i++)
+            {
+                soulsList[i].gameObject.SetActive(false);
+            }
+            
             float angle = 360f / newNumber;
             for (int i = 0; i < newNumber; i++)
             {
@@ -88,5 +138,27 @@ public class SoulFollowEffect : MonoBehaviour
         }
 
         soulsNumber = newNumber;
+    }
+    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);
+        }
+        else
+        {
+            mainModule.startColor = new ParticleSystem.MinMaxGradient(Color.white);
+            mainModule1.startColor = new ParticleSystem.MinMaxGradient(Color.white);
+        }
+        
+        
+        
+        
+
     }
 }

+ 27 - 2
ActionTowerDefense/Assets/Scripts/Spirits/Spirits_Invisible.cs → ActionTowerDefense/Assets/Scripts/Spirits/Trans_Invisible.cs

@@ -3,7 +3,7 @@ using System.Collections.Generic;
 using UnityEngine;
 using Spine.Unity;
 
-public class Spirits_Invisible : MonoBehaviour
+public class Trans_Invisible : MonoBehaviour
 {
     public Demonic demonic;
     [HideInInspector]
@@ -66,7 +66,7 @@ public class Spirits_Invisible : MonoBehaviour
             }
             
         }
-        if (playerController.isClickBtnSouth)
+        if (playerController.isClickBtnEast)
         {
 
             time = 0;
@@ -85,6 +85,16 @@ public class Spirits_Invisible : MonoBehaviour
         {
             playerController.moveSpeed = normalSpeed;
         }
+        if (playerController.isClickBtnEast)
+        {
+            if ((!soulFollowEffect.isBoom || soulFollowEffect.KBoomSoulTime > 0 )
+                &&soulCollector.soulNumbers > 0 
+                && soulCollector.soulNumbers>soulFollowEffect.boomSoulNumber)
+            {
+                AttackL();
+            }
+            
+        }
         if (!playerController.isTransfiguration)
         {
             BackToPlayer();
@@ -126,4 +136,19 @@ public class Spirits_Invisible : MonoBehaviour
         time = 0;
 
     }
+
+    void AttackL()
+    {
+        if(soulFollowEffect.boomSoulNumber == 0)
+        {
+            soulFollowEffect.KBoomSoulTime = 3;
+        }
+        else
+        {
+            soulFollowEffect.KBoomSoulTime += 1;
+        }
+        soulFollowEffect.boomSoulNumber++;
+        soulFollowEffect.SoulChangeColor(soulFollowEffect.boomSoulNumber - 1,true);
+        soulFollowEffect.isBooming = true;
+    }
 }

+ 0 - 0
ActionTowerDefense/Assets/Scripts/Spirits/Spirits_Invisible.cs.meta → ActionTowerDefense/Assets/Scripts/Spirits/Trans_Invisible.cs.meta


Някои файлове не бяха показани, защото твърде много файлове са промени