SZAND\msx_2 1 год назад
Родитель
Сommit
eb2d5a1cc6

+ 1 - 1
ActionTowerDefense/Assets/Resources/Prefab/FX/CookEffect.prefab

@@ -14724,7 +14724,7 @@ ParticleSystem:
   serializedVersion: 8
   lengthInSec: 1
   simulationSpeed: 1
-  stopAction: 0
+  stopAction: 1
   cullingMode: 0
   ringBufferMode: 0
   ringBufferLoopRange: {x: 0, y: 1}

Разница между файлами не показана из-за своего большого размера
+ 0 - 9778
ActionTowerDefense/Assets/Resources/Prefab/FX/TranCookUltimate.prefab


+ 74 - 16
ActionTowerDefense/Assets/Resources/Prefab/FX/dropMeat.prefab

@@ -41,7 +41,7 @@ ParticleSystem:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 6583644674528530498}
   serializedVersion: 8
-  lengthInSec: 2
+  lengthInSec: 5
   simulationSpeed: 1
   stopAction: 0
   cullingMode: 0
@@ -116,7 +116,7 @@ ParticleSystem:
     startLifetime:
       serializedVersion: 2
       minMaxState: 0
-      scalar: 2
+      scalar: 5
       minScalar: 5
       maxCurve:
         serializedVersion: 2
@@ -168,8 +168,8 @@ ParticleSystem:
         m_RotationOrder: 4
     startSpeed:
       serializedVersion: 2
-      minMaxState: 0
-      scalar: 4
+      minMaxState: 3
+      scalar: 8
       minScalar: 5
       maxCurve:
         serializedVersion: 2
@@ -601,7 +601,7 @@ ParticleSystem:
         m_PostInfinity: 2
         m_RotationOrder: 4
     randomizeRotationDirection: 0
-    maxNumParticles: 10
+    maxNumParticles: 200
     customEmitterVelocity: {x: 0, y: 0, z: 0}
     size3D: 0
     rotation3D: 0
@@ -661,14 +661,14 @@ ParticleSystem:
   ShapeModule:
     serializedVersion: 6
     enabled: 1
-    type: 10
+    type: 4
     angle: 25
     length: 5
     boxThickness: {x: 0, y: 0, z: 0}
     radiusThickness: 1
     donutRadius: 0.2
-    m_Position: {x: 0, y: 0, z: 0}
-    m_Rotation: {x: 90, y: 0, z: 0}
+    m_Position: {x: 0, y: 0, z: 2}
+    m_Rotation: {x: 0, y: 0, z: 0}
     m_Scale: {x: 1, y: 1, z: 1}
     placementMode: 0
     m_MeshMaterialIndex: 0
@@ -867,7 +867,7 @@ ParticleSystem:
     rateOverTime:
       serializedVersion: 2
       minMaxState: 0
-      scalar: 10
+      scalar: 0
       minScalar: 10
       maxCurve:
         serializedVersion: 2
@@ -970,8 +970,66 @@ ParticleSystem:
         m_PreInfinity: 2
         m_PostInfinity: 2
         m_RotationOrder: 4
-    m_BurstCount: 0
-    m_Bursts: []
+    m_BurstCount: 1
+    m_Bursts:
+    - serializedVersion: 2
+      time: 0
+      countCurve:
+        serializedVersion: 2
+        minMaxState: 0
+        scalar: 30
+        minScalar: 30
+        maxCurve:
+          serializedVersion: 2
+          m_Curve:
+          - serializedVersion: 3
+            time: 0
+            value: 1
+            inSlope: 0
+            outSlope: 0
+            tangentMode: 0
+            weightedMode: 0
+            inWeight: 0
+            outWeight: 0
+          - serializedVersion: 3
+            time: 1
+            value: 1
+            inSlope: 0
+            outSlope: 0
+            tangentMode: 0
+            weightedMode: 0
+            inWeight: 0
+            outWeight: 0
+          m_PreInfinity: 2
+          m_PostInfinity: 2
+          m_RotationOrder: 4
+        minCurve:
+          serializedVersion: 2
+          m_Curve:
+          - serializedVersion: 3
+            time: 0
+            value: 1
+            inSlope: 0
+            outSlope: 0
+            tangentMode: 0
+            weightedMode: 0
+            inWeight: 0
+            outWeight: 0
+          - serializedVersion: 3
+            time: 1
+            value: 1
+            inSlope: 0
+            outSlope: 0
+            tangentMode: 0
+            weightedMode: 0
+            inWeight: 0
+            outWeight: 0
+          m_PreInfinity: 2
+          m_PostInfinity: 2
+          m_RotationOrder: 4
+      cycleCount: 1
+      repeatInterval: 0.01
+      probability: 1
   SizeModule:
     enabled: 1
     curve:
@@ -2211,7 +2269,7 @@ ParticleSystem:
         m_RotationOrder: 4
     m_Range: {x: 0, y: 1}
   ForceModule:
-    enabled: 0
+    enabled: 1
     x:
       serializedVersion: 2
       minMaxState: 0
@@ -2321,7 +2379,7 @@ ParticleSystem:
     z:
       serializedVersion: 2
       minMaxState: 0
-      scalar: 0
+      scalar: -9
       minScalar: 0
       maxCurve:
         serializedVersion: 2
@@ -3639,9 +3697,9 @@ ParticleSystem:
         m_NumAlphaKeys: 2
     range: {x: 0, y: 1}
   CollisionModule:
-    enabled: 0
+    enabled: 1
     serializedVersion: 4
-    type: 0
+    type: 1
     collisionMode: 0
     colliderForce: 0
     multiplyColliderForceByParticleSize: 0
@@ -3812,7 +3870,7 @@ ParticleSystem:
     radiusScale: 1
     collidesWith:
       serializedVersion: 2
-      m_Bits: 4294967295
+      m_Bits: 8
     maxCollisionShapes: 256
     quality: 0
     voxelSize: 0.5

+ 71 - 2
ActionTowerDefense/Assets/Resources/Prefab/MySpirit/Spirits_Cook.prefab

@@ -324,8 +324,6 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   text: {fileID: 979388067414062712}
-  chuan: 10
-  intervalTimeSell: 1
   value: 20
   effect: {fileID: 417478504669294145, guid: 07c7a53ff610e0b45898f0f09276d995, type: 3}
   activeAniTime: 1.3
@@ -771,6 +769,7 @@ Transform:
   - {fileID: 3103190932458336017}
   - {fileID: 8922289277778709813}
   - {fileID: 2332805625535433500}
+  - {fileID: 4787598481067778054}
   m_Father: {fileID: 0}
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -1453,3 +1452,73 @@ MonoBehaviour:
   m_BlockingMask:
     serializedVersion: 2
     m_Bits: 4294967295
+--- !u!1001 &1578058741337959003
+PrefabInstance:
+  m_ObjectHideFlags: 0
+  serializedVersion: 2
+  m_Modification:
+    m_TransformParent: {fileID: 5440846222648032754}
+    m_Modifications:
+    - target: {fileID: 242266596801799417, guid: ec2b0f2494c993b47b700be0384a7d84, type: 3}
+      propertyPath: m_LocalPosition.y
+      value: 0.02
+      objectReference: {fileID: 0}
+    - target: {fileID: 242266596801799417, guid: ec2b0f2494c993b47b700be0384a7d84, type: 3}
+      propertyPath: m_LocalPosition.z
+      value: -0
+      objectReference: {fileID: 0}
+    - target: {fileID: 3686068518676410985, guid: ec2b0f2494c993b47b700be0384a7d84, type: 3}
+      propertyPath: m_Name
+      value: TranCookUltimate
+      objectReference: {fileID: 0}
+    - target: {fileID: 6311393983886559837, guid: ec2b0f2494c993b47b700be0384a7d84, type: 3}
+      propertyPath: m_RootOrder
+      value: 6
+      objectReference: {fileID: 0}
+    - target: {fileID: 6311393983886559837, guid: ec2b0f2494c993b47b700be0384a7d84, type: 3}
+      propertyPath: m_LocalPosition.x
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 6311393983886559837, guid: ec2b0f2494c993b47b700be0384a7d84, type: 3}
+      propertyPath: m_LocalPosition.y
+      value: 2.15
+      objectReference: {fileID: 0}
+    - target: {fileID: 6311393983886559837, guid: ec2b0f2494c993b47b700be0384a7d84, type: 3}
+      propertyPath: m_LocalPosition.z
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 6311393983886559837, guid: ec2b0f2494c993b47b700be0384a7d84, type: 3}
+      propertyPath: m_LocalRotation.w
+      value: 1
+      objectReference: {fileID: 0}
+    - target: {fileID: 6311393983886559837, guid: ec2b0f2494c993b47b700be0384a7d84, type: 3}
+      propertyPath: m_LocalRotation.x
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 6311393983886559837, guid: ec2b0f2494c993b47b700be0384a7d84, type: 3}
+      propertyPath: m_LocalRotation.y
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 6311393983886559837, guid: ec2b0f2494c993b47b700be0384a7d84, type: 3}
+      propertyPath: m_LocalRotation.z
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 6311393983886559837, guid: ec2b0f2494c993b47b700be0384a7d84, type: 3}
+      propertyPath: m_LocalEulerAnglesHint.x
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 6311393983886559837, guid: ec2b0f2494c993b47b700be0384a7d84, type: 3}
+      propertyPath: m_LocalEulerAnglesHint.y
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 6311393983886559837, guid: ec2b0f2494c993b47b700be0384a7d84, type: 3}
+      propertyPath: m_LocalEulerAnglesHint.z
+      value: 0
+      objectReference: {fileID: 0}
+    m_RemovedComponents: []
+  m_SourcePrefab: {fileID: 100100000, guid: ec2b0f2494c993b47b700be0384a7d84, type: 3}
+--- !u!4 &4787598481067778054 stripped
+Transform:
+  m_CorrespondingSourceObject: {fileID: 6311393983886559837, guid: ec2b0f2494c993b47b700be0384a7d84, type: 3}
+  m_PrefabInstance: {fileID: 1578058741337959003}
+  m_PrefabAsset: {fileID: 0}

+ 3 - 0
ActionTowerDefense/Assets/Scripts/Character.cs

@@ -327,8 +327,11 @@ public class Character : MonoBehaviour
         meshRenderer.sortingOrder = order;
     }
 
+    public GameObject cookEffect;
+
     public void HpUp(float value, float larger)
     {
+        cookEffect.SetActive(true);
         int add = 0;
         switch (hptp)
         {

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

@@ -501,7 +501,7 @@ public class PlayerController : MoveCharacter
 
     void OnTransfigurate()      //񄐡
     {
-        if (!isFloat && canMove)
+        if (!isFloat && canMove && !isBaseBtnOut)
         {
             isClickBtnTransfigurate = true;
         }
@@ -509,7 +509,7 @@ public class PlayerController : MoveCharacter
 
     void OnTransfigurateUp()      //ËÉ¿ª±äÉí¼ü
     {
-        if (isTransfiguration)
+        if (isTransfiguration && !isBaseBtnOut)
         {
             keyTransfigurateRelease = true;
         }

+ 32 - 27
ActionTowerDefense/Assets/Scripts/Spirits/Base_Spirits/SpiritSystem.cs

@@ -219,38 +219,44 @@ public class SpiritSystem : MonoBehaviour
         switch (id)
         {
             case 0:
-                s1.hasSpirits--;
-                for(int i = curCard1; i < s1.hasSpirits; i++)
+                if (s1.hasSpirits > 0)
                 {
-                    player1cards[i].sprite = player1cards[i + 1].sprite;
-                    s1.ownSpirits[i] = s1.ownSpirits[i + 1];
-                    s1.ultimateTimes[i] = s1.ultimateTimes[i + 1];
-                    s1.hps[i] = s1.hps[i + 1];
+                    s1.hasSpirits--;
+                    for (int i = curCard1; i < s1.hasSpirits; i++)
+                    {
+                        player1cards[i].sprite = player1cards[i + 1].sprite;
+                        s1.ownSpirits[i] = s1.ownSpirits[i + 1];
+                        s1.ultimateTimes[i] = s1.ultimateTimes[i + 1];
+                        s1.hps[i] = s1.hps[i + 1];
+                    }
+                    tranHp1 = s1.hps[0];
+                    player1cards[s1.hasSpirits].sprite = NoneHead;
+                    s1.ownSpirits[s1.hasSpirits] = Spirits.SpiritType.None;
+                    s1.currentSpirit = s1.ownSpirits[0];
+                    choose1.transform.position = player1cards[0].transform.position;
+                    P1times.gameObject.SetActive(false);
+                    curCard1 = 0;
                 }
-                tranHp1 = s1.hps[0];
-                player1cards[s1.hasSpirits].sprite = NoneHead;
-                s1.ownSpirits[s1.hasSpirits] = Spirits.SpiritType.None;
-                s1.currentSpirit = s1.ownSpirits[0];
-                choose1.transform.position = player1cards[0].transform.position;
-                P1times.gameObject.SetActive(false);
-                curCard1 = 0;
                 break;
             case 1:
-                s2.hasSpirits--;
-                for (int i = curCard2; i < s2.hasSpirits; i++)
+                if (s2.hasSpirits > 0)
                 {
-                    player2cards[i].sprite = player2cards[i + 1].sprite;
-                    s2.ownSpirits[i] = s2.ownSpirits[i + 1];
-                    s2.ultimateTimes[i] = s2.ultimateTimes[i + 1];
-                    s2.hps[i] = s2.hps[i + 1];
+                    s2.hasSpirits--;
+                    for (int i = curCard2; i < s2.hasSpirits; i++)
+                    {
+                        player2cards[i].sprite = player2cards[i + 1].sprite;
+                        s2.ownSpirits[i] = s2.ownSpirits[i + 1];
+                        s2.ultimateTimes[i] = s2.ultimateTimes[i + 1];
+                        s2.hps[i] = s2.hps[i + 1];
+                    }
+                    tranHp2 = s2.hps[0];
+                    player2cards[s2.hasSpirits].sprite = NoneHead;
+                    s2.ownSpirits[s2.hasSpirits] = Spirits.SpiritType.None;
+                    s2.currentSpirit = s2.ownSpirits[0];
+                    choose2.transform.position = player2cards[0].transform.position;
+                    P2times.gameObject.SetActive(false);
+                    curCard2 = 0;
                 }
-                tranHp2 = s2.hps[0];
-                player2cards[s2.hasSpirits].sprite = NoneHead;
-                s2.ownSpirits[s2.hasSpirits] = Spirits.SpiritType.None;
-                s2.currentSpirit = s2.ownSpirits[0];
-                choose2.transform.position = player2cards[0].transform.position;
-                P2times.gameObject.SetActive(false);
-                curCard2 = 0;
                 break;
             default:
                 break;
@@ -273,7 +279,6 @@ public class SpiritSystem : MonoBehaviour
                     choose1.transform.position = player1cards[curCard1].transform.position;
                     p1Spirits.currentSpirit = p1Spirits.ownSpirits[curCard1];
                     tranHp1 = s1.hps[curCard1];
-                    print(tranHp1);
                 }
                 break;
             case 1:

+ 7 - 1
ActionTowerDefense/Assets/Scripts/Spirits/CookEffect.cs

@@ -6,12 +6,18 @@ public class CookEffect : MonoBehaviour
 {
     public float value;
     public float larger;
+    public GameObject cookeffect;
 
     private void OnTriggerEnter(Collider other)
     {
         if (other.gameObject.layer == 6 || other.gameObject.layer == 7 || other.gameObject.layer == 8)
         {
-            other.GetComponent<MoveCharacter>().HpUp(value, larger);
+            MoveCharacter mc = other.GetComponent<MoveCharacter>();
+            if (mc.cookEffect == null)
+            {
+                mc.cookEffect = Instantiate(cookeffect, mc.transform.position, new Quaternion(0, 0, 0, 0), mc.transform);
+            }
+            mc.HpUp(value, larger);
         }
     }
 }

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

@@ -73,6 +73,10 @@ public class ESpirits_Cook : MonoBehaviour
                         chuan -= 1;
                         text.text = chuan.ToString();
                         ani.Play("attack_march", 0, 0);
+                        if (target.cookEffect == null)
+                        {
+                            target.cookEffect = Instantiate(effect, target.transform.position, new Quaternion(0, 0, 0, 0), target.transform);
+                        }
                         target.HpUp(value, larger);
                         customers.Add(target);
                         //count += 1;

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

@@ -9,7 +9,6 @@ public class Spirits_Cook : MonoBehaviour
     private GameObject dia;             //文本框
 
     private Transform cook;             //厨子
-    private Collider col;               //厨子的碰撞体
 
     public float value;                 //加血程度百分比
     public GameObject effect;           //加血效果
@@ -30,8 +29,6 @@ public class Spirits_Cook : MonoBehaviour
     {
         cook = transform.parent;
         dem = cook.GetComponent<Demonic>();
-        col = GetComponent<Collider>();
-        col.enabled = false;
         dia = text.transform.parent.gameObject;
         dia.SetActive(false);
         dem.isNonAttack = true;
@@ -46,7 +43,6 @@ public class Spirits_Cook : MonoBehaviour
             {
                 dia.SetActive(true);
                 isAct = true;
-                col.enabled = true;
             }
         }
     }

+ 27 - 10
ActionTowerDefense/Assets/Scripts/Spirits/TransCookEffect.cs

@@ -4,26 +4,43 @@ using UnityEngine;
 
 public class TransCookEffect : MonoBehaviour
 {
-    public GameObject attributesUpEffect;
-    public float attackUp;
-    public float speedUp;
-    public float continueTime;
-    public float effectTime;
+    public float value;
+    public float larger;
+
+    public Demonic owner;
+
+    public float lastTime;
+    private float pastTime;
+
+    public GameObject cookeffect;
+
+    private void Start()
+    {
+        owner = GetComponentInParent<Demonic>();
+    }
 
     private void OnTriggerEnter(Collider other)
     {
         if (other.gameObject.layer == 7)
         {
             Demonic dem = other.GetComponentInParent<Demonic>();
-            if (!dem.hasUp)
+            if (dem != owner)
             {
-                dem.hasUp = true;
-                if (dem.isFirst)
+                if (dem.cookEffect == null)
                 {
-                    dem.attributeUpEffect = attributesUpEffect;
+                    dem.cookEffect = Instantiate(cookeffect, dem.transform.position, new Quaternion(0, 0, 0, 0), dem.transform);
                 }
-                dem.AttackAttributesUp(attackUp, speedUp, continueTime);
+                dem.HpUp(value, larger);
             }
         }
     }
+
+    private void Update()
+    {
+        pastTime += Time.deltaTime;
+        if (pastTime >= lastTime)
+        {
+            transform.parent.gameObject.SetActive(false);
+        }
+    }
 }

+ 1 - 18
ActionTowerDefense/Assets/Scripts/Spirits/Trans_Cook.cs

@@ -5,24 +5,13 @@ using UnityEngine;
 public class Trans_Cook : MonoBehaviour
 {
     public PlayerController controller;
-    //private GameObject player;
-    //public float changeTime;
     public Vector3 UIoffset;                //UIµ÷ÕûÖµ
-    public GameObject ultimateEffect;
-    public float effectTime;                //ÌØÐ§³ÖÐøÊ±¼ä
-    public GameObject attributeUpEffect;
-    private TransCookEffect effectCS;
 
     private void Start()
     {
         controller = GetComponentInParent<PlayerController>();
-        //player = controller.gameObject;
-        //controller.changeTime = changeTime;
         controller.uiHp.transform.position += UIoffset;
         controller.uiMp.transform.position += UIoffset;
-        effectCS = ultimateEffect.GetComponentInChildren<TransCookEffect>();
-        effectTime = effectCS.effectTime;
-        effectCS.attributesUpEffect = attributeUpEffect;
     }
 
     private void OnDisable()
@@ -31,18 +20,12 @@ public class Trans_Cook : MonoBehaviour
         controller.uiMp.transform.position -= UIoffset;
     }
 
-    private void Disappear()
-    {
-        controller.EndTransfiguration(2);
-    }
-
     private void Update()
     {
         if (controller.isUltimate)
         {
             controller.isUltimate = false;
-            ultimateEffect.SetActive(true);
-            Invoke("Disappear", effectTime);
+            controller.EndTransfiguration(2);
         }
     }
 }

Некоторые файлы не были показаны из-за большого количества измененных файлов