wgl 6 сар өмнө
parent
commit
c30b2579c3

+ 38 - 37
ActionTowerDefense/Assets/Resources/Prefab/Player.prefab

@@ -910,10 +910,6 @@ MonoBehaviour:
   flyingSwordsObj: {fileID: 256012001268456902, guid: 28fffa39583087344b7b2620e7284dd5, type: 3}
   angryBulletObj: {fileID: 8625694250200680089, guid: 4a30da3dcf83256468df404f06d44533, type: 3}
   angryBulletNum: 7
-  fanFlyingSwords: {fileID: 256012001268456902, guid: 26ed0fb31296bdd4bb45e22ce2b925bc, type: 3}
-  flyingSwordsAngleRange: 90
-  flyintSwordsArrivalAngle: 0
-  flyingSwordsNum: 7
   isClickBtnJump: 0
   isClickBtnRush: 0
   isKeepBtnRush: 0
@@ -1181,7 +1177,13 @@ MonoBehaviour:
   - 0.5
   - 0.5
   - 0.5
-  conductSkills: 000000000300000005000000
+  conductSkills: 000000000100000002000000
+  flyingSwords:
+    obj: {fileID: 256012001268456902, guid: 26ed0fb31296bdd4bb45e22ce2b925bc, type: 3}
+    angleRange: 90
+    arrivalAngle: 0
+    nums: 7
+    damage: 100
   giant:
     bigGiant: {fileID: 5440846222648032759, guid: d64528a2dcc945b4a9ea5d5a859679f3, type: 3}
     temptHp: 1000
@@ -1556,38 +1558,6 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: 1d04dd6e35d71724689001e450625c39, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
-  haveNewSpecialStates: 0
-  attackInfo:
-    attackValue: 0
-    damage: 0
-    attackDir: {x: 0, y: 0, z: 0}
-    attackEffect: 
-    floatState:
-      time: 0
-      upTime: {x: 0, y: 0}
-      backSpeed: {x: 0, y: 0}
-      rotateSpeed: {x: 0, y: 0}
-      height: {x: 0, y: 0}
-    blowUp:
-      dir: {x: 0, y: 0, z: 0}
-      force: 0
-      time: 0
-    shotDown:
-      dir: {x: 0, y: 0, z: 0}
-      force: 0
-      time: 0
-    weak:
-      time: 0
-    armor:
-      rate: 0
-    vulnerable:
-      rate: 0
-      time: 0
-    changeDamage:
-      rate: 0
-    sustainedInjury:
-      damage: 0
-  attackFrom: {fileID: 0}
   curSpecialStates: -1
   attributeTime: 0
   floatingState: 0
@@ -1619,6 +1589,37 @@ MonoBehaviour:
   isFreeze: 0
   canFreeze: 0
   curCharacterState: 0
+  attackInfoData:
+    attackValue: 0
+    damage: 0
+    attackDir: {x: 0, y: 0, z: 0}
+    attackEffect: 
+    floatState:
+      time: 0
+      upTime: {x: 0, y: 0}
+      backSpeed: {x: 0, y: 0}
+      rotateSpeed: {x: 0, y: 0}
+      height: {x: 0, y: 0}
+    blowUp:
+      dir: {x: 0, y: 0, z: 0}
+      force: 0
+      time: 0
+    shotDown:
+      dir: {x: 0, y: 0, z: 0}
+      force: 0
+      time: 0
+    weak:
+      time: 0
+    armor:
+      rate: 0
+    vulnerable:
+      rate: 0
+      time: 0
+    changeDamage:
+      rate: 0
+    sustainedInjury:
+      damage: 0
+  attackFromData: {fileID: 0}
   hitStunTime: 0
   canHitStun: 0
 --- !u!1 &5747259993936315763

+ 0 - 5
ActionTowerDefense/Assets/Scripts/Characters/PlayerController.cs

@@ -149,11 +149,6 @@ public class PlayerController : MoveCharacter
     //怨气弹
     public GameObject angryBulletObj;
     [Header("怨气弹数量基数")] public int angryBulletNum;
-    //扇形飞剑
-    public GameObject fanFlyingSwords;
-    [Header("飞剑角度范围")] public float flyingSwordsAngleRange;
-    [Header("飞剑角度入射角")] public float flyintSwordsArrivalAngle;
-    [Header("飞剑数量基数")] public int flyingSwordsNum;
 
     public bool btnJumpPress
     {

+ 39 - 20
ActionTowerDefense/Assets/Scripts/Conduct/ConductController.cs

@@ -13,8 +13,8 @@ public class ConductController : MonoBehaviour
     public enum ConductSkills
     {
         //弓箭手
-        [LabelText("怨气弹")]
-        AngryBullet,
+        //[LabelText("怨气弹")]
+        //AngryBullet,
         [LabelText("扇形飞剑")]
         FlyingSwords,
 
@@ -23,21 +23,36 @@ public class ConductController : MonoBehaviour
         Giant,
         [LabelText("光球")]
         Photon, 
-        [LabelText("增加攻击力")]
-        AddAttack,
+        //[LabelText("增加攻击力")]
+        //AddAttack,
 
         //棒子
-        [LabelText("泰山压顶")]
-        Mountain,
-        [LabelText("气功波")]
-        WavePower,
-        [LabelText("御剑术")]
-        SwordsControl,
+        //[LabelText("泰山压顶")]
+        //Mountain,
+        //[LabelText("气功波")]
+        //WavePower,
+        //[LabelText("御剑术")]
+        //SwordsControl,
     }
 
     [LabelText("转换率")] public float[] conversionRate;
     [LabelText("融魂技")] public ConductSkills[] conductSkills;
-    
+
+    //扇形飞剑
+    [Serializable]
+    public struct FlyingSwords
+    {
+        public GameObject obj;
+        [LabelText("角度范围")] public float angleRange;
+        [LabelText("入射角")] public float arrivalAngle;
+        [LabelText("数量基数")] public int nums;
+        [LabelText("伤害")] public int damage;
+    }
+    private bool ShowFlyingSwords() => conductSkills.Contains(ConductSkills.FlyingSwords);
+    [ShowIf("ShowFlyingSwords")]
+    [LabelText("扇形飞剑参数")]
+    public FlyingSwords flyingSwords;
+
     [Serializable] public struct Giant
     {
         public GameObject bigGiant;
@@ -62,6 +77,7 @@ public class ConductController : MonoBehaviour
     [ShowIf("ShowPhotosphere")][LabelText("光球参数")]
     public Photon photon;
 
+    
     private void Awake()
     {
         playerController = GetComponent<PlayerController>();
@@ -104,6 +120,17 @@ public class ConductController : MonoBehaviour
             }
             switch (conductSkills[demonicId])
             {
+                /*弓箭手*/
+                case ConductSkills.FlyingSwords:
+                    obj = Instantiate(flyingSwords.obj);
+                    FanFlyingSwords FFS = obj.GetComponent<FanFlyingSwords>();
+                    FFS.owner = playerController;
+                    FFS.angleRange = flyingSwords.angleRange;
+                    FFS.arrivalAngle = flyingSwords.arrivalAngle;
+                    FFS.swordsNum = boostNum * flyingSwords.nums;
+                    FFS.damage = flyingSwords.damage;
+                    FFS.Biu();
+                    break;
                 /*胖子*/
                 //融合大胖子
                 case ConductSkills.Giant:
@@ -235,15 +262,7 @@ public class ConductController : MonoBehaviour
                     //            angryBulletControl.cacheConductId = cacheConductId;
                     //            angryBulletControl.maxNum = boostNum * angryBulletNum;
                     //            break;
-                    //        case ConductSkills.FlyingSwords:
-                    //            obj = Instantiate(fanFlyingSwords);
-                    //            FanFlyingSwords FFS = obj.GetComponent<FanFlyingSwords>();
-                    //            FFS.owner = this;
-                    //            FFS.angleRange = flyingSwordsAngleRange;
-                    //            FFS.arrivalAngle = flyintSwordsArrivalAngle;
-                    //            FFS.swordsNum = boostNum * flyingSwordsNum;
-                    //            FFS.Biu();
-                    //            break;
+
             }
         }
     }

+ 2 - 0
ActionTowerDefense/Assets/Scripts/Conduct/FanFlyingSwords.cs

@@ -30,6 +30,8 @@ public class FanFlyingSwords : MonoBehaviour
             }
             angle = angle / 180 * Mathf.PI;
             dir = new Vector3(Mathf.Cos(angle), Mathf.Sin(angle), 0);
+            //先改角色attackInfo并读取,之后重做的时候再改
+            owner.attackController.attackInfo.damage = damage;
             obj.GetComponent<Bullet>().BeShoot(owner, owner.transform.position + Vector3.up, dir, false);
         }