Forráskód Böngészése

变身厨师技能

SZAND\msx_2 1 éve
szülő
commit
16df9c4f99

+ 1 - 1
ActionTowerDefense/Assets/Resources/Prefab/MySpirit/Spirits_Cook.prefab

@@ -324,7 +324,7 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   text: {fileID: 979388067414062712}
-  chuan: 10
+  chuan: 5
   isGood: 1
   colliders:
   - {fileID: 4480734502875862885}

+ 4 - 0
ActionTowerDefense/Assets/Resources/Prefab/Transfiguration/Trans_Cook.prefab

@@ -1705,6 +1705,10 @@ PrefabInstance:
       propertyPath: m_LocalEulerAnglesHint.z
       value: 0
       objectReference: {fileID: 0}
+    - target: {fileID: 6441395640965462743, guid: ec2b0f2494c993b47b700be0384a7d84, type: 3}
+      propertyPath: effectTime
+      value: 2.2
+      objectReference: {fileID: 0}
     m_RemovedComponents: []
   m_SourcePrefab: {fileID: 100100000, guid: ec2b0f2494c993b47b700be0384a7d84, type: 3}
 --- !u!1 &1704197884621297415 stripped

+ 7 - 6
ActionTowerDefense/Assets/Scripts/Demonic.cs

@@ -598,7 +598,7 @@ public class Demonic : MoveCharacter
         attackTarget = targetCharacter;
     }
 
-    private int[] origDamages;
+    private List<AttackInfo> origAttackInfos = new List<AttackInfo>();
     private float origAttackTime;
     private int count;
     public GameObject attributeUpEffect;
@@ -615,12 +615,13 @@ public class Demonic : MoveCharacter
         }
         curUpEffect.SetActive(true);
         count = attack2Infos.Count;
-        origDamages = new int[count];
         for (int i = 0; i < count; i++)
         {
-            int d = attack2Infos[i].damage;
-            origDamages[i] = d;
-            attack2Infos[i].setDamage((int)(d * (1 + upDamageDegree)));
+            AttackInfo a = attack2Infos[i];
+            origAttackInfos.Add(a);
+            int d = a.damage;
+            a.damage = (int)(d * (1 + upDamageDegree));
+            attack2Infos[i] = a;
         }
         origAttackTime = totalAttack2Time;
         totalAttack2Time = totalAttack2Time / (1 + upAttackSpeedDegree);
@@ -632,7 +633,7 @@ public class Demonic : MoveCharacter
         curUpEffect.SetActive(false);
         for (int i = 0; i < count; i++)
         {
-            attack2Infos[i].setDamage(origDamages[i]);
+            attack2Infos[i] = origAttackInfos[i];
         }
         totalAttack2Time = origAttackTime;
         hasUp = false;

+ 1 - 5
ActionTowerDefense/Assets/Scripts/PlayerController.cs

@@ -22,10 +22,6 @@ public struct AttackInfo
     public float force;
     public bool changeHurt;
     public float repelValue;
-    public void setDamage(int newDamage)
-    {
-        this.damage = newDamage;
-    }
 }
 
 public enum PlayerAttackState
@@ -1601,7 +1597,7 @@ public class PlayerController : MoveCharacter
         spiritObj.SetActive(false);
         if (endTranSummon)
         {
-            Summon(id);
+            Summon(endChange);
         }
         CheckPlayerChangeState();
         endChange = 0;