Pārlūkot izejas kodu

融魂技准备特效拆分

LAPTOP-OM1V99U2\永远de小亡灵 10 mēneši atpakaļ
vecāks
revīzija
39d39fefb6

+ 77 - 1
ActionTowerDefense/Assets/Resources/Prefab/Conduct/conductReady.prefab

@@ -24,14 +24,15 @@ Transform:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 256012001268456902}
+  serializedVersion: 2
   m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
   m_LocalPosition: {x: 0, y: 0, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
   m_Children:
   - {fileID: 3157771271738667440}
+  - {fileID: 8329788656594862105}
   m_Father: {fileID: 0}
-  m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!114 &653345970205402394
 MonoBehaviour:
@@ -45,12 +46,84 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: efc3c75c4c266ef488ed0a1ba33a2910, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
+  isShowing0: 0
+  isShowing1: 0
   starFx: {fileID: 8750109257812787716}
+  star_endFx: {fileID: 2388403796897772461}
+  closeFx: 1
+--- !u!1001 &5104131334889947190
+PrefabInstance:
+  m_ObjectHideFlags: 0
+  serializedVersion: 2
+  m_Modification:
+    serializedVersion: 3
+    m_TransformParent: {fileID: 1639900831015566504}
+    m_Modifications:
+    - target: {fileID: 3840689505256603695, guid: ac0eaf066ef7deb49aff148e7ecf465c, type: 3}
+      propertyPath: m_LocalPosition.x
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 3840689505256603695, guid: ac0eaf066ef7deb49aff148e7ecf465c, type: 3}
+      propertyPath: m_LocalPosition.y
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 3840689505256603695, guid: ac0eaf066ef7deb49aff148e7ecf465c, type: 3}
+      propertyPath: m_LocalPosition.z
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 3840689505256603695, guid: ac0eaf066ef7deb49aff148e7ecf465c, type: 3}
+      propertyPath: m_LocalRotation.w
+      value: 1
+      objectReference: {fileID: 0}
+    - target: {fileID: 3840689505256603695, guid: ac0eaf066ef7deb49aff148e7ecf465c, type: 3}
+      propertyPath: m_LocalRotation.x
+      value: -0
+      objectReference: {fileID: 0}
+    - target: {fileID: 3840689505256603695, guid: ac0eaf066ef7deb49aff148e7ecf465c, type: 3}
+      propertyPath: m_LocalRotation.y
+      value: -0
+      objectReference: {fileID: 0}
+    - target: {fileID: 3840689505256603695, guid: ac0eaf066ef7deb49aff148e7ecf465c, type: 3}
+      propertyPath: m_LocalRotation.z
+      value: -0
+      objectReference: {fileID: 0}
+    - target: {fileID: 3840689505256603695, guid: ac0eaf066ef7deb49aff148e7ecf465c, type: 3}
+      propertyPath: m_LocalEulerAnglesHint.x
+      value: -90
+      objectReference: {fileID: 0}
+    - target: {fileID: 3840689505256603695, guid: ac0eaf066ef7deb49aff148e7ecf465c, type: 3}
+      propertyPath: m_LocalEulerAnglesHint.y
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 3840689505256603695, guid: ac0eaf066ef7deb49aff148e7ecf465c, type: 3}
+      propertyPath: m_LocalEulerAnglesHint.z
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 7489720370543948699, guid: ac0eaf066ef7deb49aff148e7ecf465c, type: 3}
+      propertyPath: m_Name
+      value: star_end
+      objectReference: {fileID: 0}
+    m_RemovedComponents: []
+    m_RemovedGameObjects: []
+    m_AddedGameObjects: []
+    m_AddedComponents: []
+  m_SourcePrefab: {fileID: 100100000, guid: ac0eaf066ef7deb49aff148e7ecf465c, type: 3}
+--- !u!1 &2388403796897772461 stripped
+GameObject:
+  m_CorrespondingSourceObject: {fileID: 7489720370543948699, guid: ac0eaf066ef7deb49aff148e7ecf465c, type: 3}
+  m_PrefabInstance: {fileID: 5104131334889947190}
+  m_PrefabAsset: {fileID: 0}
+--- !u!4 &8329788656594862105 stripped
+Transform:
+  m_CorrespondingSourceObject: {fileID: 3840689505256603695, guid: ac0eaf066ef7deb49aff148e7ecf465c, type: 3}
+  m_PrefabInstance: {fileID: 5104131334889947190}
+  m_PrefabAsset: {fileID: 0}
 --- !u!1001 &8916027172269287196
 PrefabInstance:
   m_ObjectHideFlags: 0
   serializedVersion: 2
   m_Modification:
+    serializedVersion: 3
     m_TransformParent: {fileID: 1639900831015566504}
     m_Modifications:
     - target: {fileID: 203424476612699416, guid: f3a0026daa5674441b25b18d98ea18cd, type: 3}
@@ -418,6 +491,9 @@ PrefabInstance:
       value: 0.33333334
       objectReference: {fileID: 0}
     m_RemovedComponents: []
+    m_RemovedGameObjects: []
+    m_AddedGameObjects: []
+    m_AddedComponents: []
   m_SourcePrefab: {fileID: 100100000, guid: f3a0026daa5674441b25b18d98ea18cd, type: 3}
 --- !u!4 &3157771271738667440 stripped
 Transform:

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 196 - 40
ActionTowerDefense/Assets/Resources/Prefab/FX/star.prefab


+ 39 - 10
ActionTowerDefense/Assets/Scripts/Conduct/ConductReadyTip.cs

@@ -4,36 +4,65 @@ using UnityEngine;
 
 public class ConductReadyTip : MonoBehaviour
 {
-    public bool isShowing;
+    public bool isShowing0;
+    public bool isShowing1;
     public GameObject starFx;
+    public GameObject star_endFx;
     private float time;
+    public float closeFx;
     private void Start()
     {
         starFx.SetActive(false);
     }
     void Update()
     {
-        if (isShowing)
+        if (isShowing0)
         {
             time += Time.deltaTime;
-            if(time >= 1)
+            if(time >= closeFx)
             {
                 starFx.SetActive(false);
-                isShowing = false;
+                star_endFx.SetActive(false);
+                isShowing0 = false;
+            }
+        }
+        if (isShowing1)
+        {
+            time += Time.deltaTime;
+            if (time >= closeFx)
+            {
+                star_endFx.SetActive(false);
+                isShowing1 = false;
             }
         }
     }
-    public void Show()
+    public void Show(int id)
     {
-        isShowing = true;
-        starFx.SetActive(true);
-        starFx.GetComponent<ParticleSystem>().Simulate(0);
-        starFx.GetComponent<ParticleSystem>().Play();
+        switch (id)
+        {
+            case 0:
+                time = 0;
+                isShowing0 = true;
+                starFx.SetActive(false);
+                starFx.SetActive(true);
+                break;
+            case 1:
+                isShowing0 = false;
+                time = 0;
+                isShowing1 = true;
+                starFx.SetActive(false);
+                star_endFx.SetActive(false);
+                star_endFx.SetActive(true);
+                break;
+        }
+        
     }
     public void Init()
     {
         starFx.SetActive(false);
-        isShowing = false;
+        star_endFx.SetActive(false);
+        isShowing0 = false;
+        isShowing1 = false;
         time = 0;
     }
 }

+ 7 - 2
ActionTowerDefense/Assets/Scripts/PlayerController.cs

@@ -706,13 +706,18 @@ public class PlayerController : MoveCharacter
             if(conductTime >= totalCacheSummonTime + canConductTime[nowConductButton] * timeSlowingMultiplier)
             {
                 isReadyConduct = true;
+                if (!conductReadyTip.isShowing1)
+                {
+                    conductReadyTip.Show(1);
+                }
+                
             }
             else if( conductTime >= totalCacheSummonTime + (canConductTime[nowConductButton] - readyTipFxTime) * timeSlowingMultiplier)
             {
-                if (!conductReadyTip.isShowing)
+                if (!conductReadyTip.isShowing0)
                 {
                     Time.timeScale = timeSlowingMultiplier;
-                    conductReadyTip.Show();
+                    conductReadyTip.Show(0);
                 }
 
             }

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels