Prechádzať zdrojové kódy

雷光炮加入打击感系统

WGL 1 mesiac pred
rodič
commit
7c2ea62a8b

+ 2 - 1
ActionTowerDefense/Assets/Resources/Prefab/Conduct/FanFlyingSwordsControl.prefab

@@ -46,7 +46,8 @@ MonoBehaviour:
   m_EditorClassIdentifier: 
   sword: {fileID: 7473170563405908938, guid: b15191cc05dd8f84d918f66bd2ca2419, type: 3}
   owner: {fileID: 0}
-  angleRange: 0
+  angleRange: 90
   arrivalAngle: 0
   swordsNum: 0
   damage: 150
+  attackValue: 20

+ 1 - 1
ActionTowerDefense/Assets/Scripts/Characters/MoveCharacter.cs

@@ -339,7 +339,7 @@ public class MoveCharacter : Character
         //敌方士兵受起手式伤害/我方士兵受伤 闪白
         if (!isFrozen)
         {
-            if (attackFrom.CompareTag("Demonic") && attackInfo.attackMethod_Type == AttackMethod_Type.Attack_Summon)
+            if ((attackFrom.CompareTag("Demonic")||attackFrom.CompareTag("Player")) && attackInfo.attackMethod_Type == AttackMethod_Type.Attack_Summon)
             {
                 beHitTrigger.JudgeTurnWhite(true, this);
             }

+ 10 - 2
ActionTowerDefense/Assets/Scripts/Conduct/ConductController.cs

@@ -139,13 +139,21 @@ public class ConductController : MonoBehaviour
                     obj = PoolManager.Instantiate(flyingSwords.obj);
                     FanFlyingSwords FFS = obj.GetComponent<FanFlyingSwords>();
                     FFS.owner = playerController;
-                    FFS.angleRange = flyingSwords.angleRange;
-                    FFS.arrivalAngle = flyingSwords.arrivalAngle;
                     FFS.swordsNum = dienum * flyingSwords.power[rarity[demonicId]];
                     tagAdd += flyingSwords.effectBonus * myTreasureTag[(int)flyingSwords.attributeTag - 1] / 100;
                     FFS.damage = (int)(attackDamage * tagAdd);
                     FFS.Biu();
                     break;
+                case ConductSkills.IceRain:
+                    ConductManager.IceRain iceRain = conductManager.iceRain;
+                    obj = PoolManager.Instantiate(iceRain.obj);
+                    IceRainController iceRainController = obj.GetComponent<IceRainController>();
+                    iceRainController.owner = playerController;
+                    iceRainController.swordsNum = dienum * iceRain.power[rarity[demonicId]];
+                    tagAdd += iceRain.effectBonus * myTreasureTag[(int)iceRain.attributeTag - 1] / 100;
+                    iceRainController.damage = (int)(attackDamage * tagAdd);
+                    iceRainController.Biu();
+                    break;
                 /*ÅÖ×Ó*/
                 //ÈںϴóÅÖ×Ó
                 case ConductSkills.Giant:

+ 7 - 5
ActionTowerDefense/Assets/Scripts/Conduct/FanFlyingSwords.cs

@@ -1,3 +1,4 @@
+using Sirenix.OdinInspector;
 using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
@@ -9,8 +10,8 @@ public class FanFlyingSwords : MonoBehaviour
     public float angleRange;
     public float arrivalAngle;
     public int swordsNum;
-    [Header("伤害")]public int damage;
-    // Start is called before the first frame update
+    public int damage;
+    [LabelText("击打值")] public int attackValue;
     public void Biu()
     {
         float angleInterval = angleRange / (float)(swordsNum - 1);
@@ -30,9 +31,10 @@ public class FanFlyingSwords : MonoBehaviour
             }
             angle = angle / 180 * Mathf.PI;
             dir = new Vector3(Mathf.Cos(angle), Mathf.Sin(angle), 0);
-            //先改角色attackInfo并读取,之后重做的时候再改
-            owner.attackController.curAttackMethod.attackInfo.damage = damage;
-            obj.GetComponent<Bullet>().BeShoot(owner, owner.transform.position + Vector3.up, dir, false);
+            AttackController.AttackMethod attackMethod = owner.attackController.curAttackMethod;
+            attackMethod.attackInfo.damage = damage;
+            attackMethod.attackInfo.attackValue = attackValue;
+            obj.GetComponent<Bullet>().BeShoot(owner, owner.transform.position + Vector3.up, dir, false, attackMethod: attackMethod);
         }
         
     }