Переглянути джерело

大胖子可以攻击,修复跳字相关问题

WGL 2 місяців тому
батько
коміт
ed00580947

+ 65 - 124
ActionTowerDefense/Assets/Resources/Prefab/Conduct/Demonic_BigGiant.prefab

@@ -50,7 +50,7 @@ GameObject:
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 1
+  m_IsActive: 0
 --- !u!4 &8927539278125731317
 Transform:
   m_ObjectHideFlags: 0
@@ -94,7 +94,6 @@ MonoBehaviour:
   canBreakWall: 0
   wallBrealNum: 10
   isShoot: 0
-  type: 1
   owner: {fileID: 0}
   isSingleAttack: 0
   cantSingleAttack: 0
@@ -103,7 +102,9 @@ MonoBehaviour:
     attackValue: 0
     damage: 0
     attackDir: {x: 0, y: 0, z: 0}
+    effect: {fileID: 0}
     attackEffect: 
+    attackMethod_Type: 0
     floatState:
       time: 0
       upTime: {x: 0, y: 0}
@@ -144,7 +145,6 @@ MonoBehaviour:
       rate: 0
     sustainedInjury:
       damage: 0
-    isDemSummon: 0
   force: {x: 0, y: 0, z: 0}
   changeHurt: 0
   repelValue: 0
@@ -213,6 +213,7 @@ MonoBehaviour:
   owner: {fileID: 0}
   attackerID: 0
   curX: 0
+  mats: []
 --- !u!114 &4301865574317177265
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -230,7 +231,9 @@ MonoBehaviour:
     attackValue: 0
     damage: 0
     attackDir: {x: 0, y: 0, z: 0}
+    effect: {fileID: 0}
     attackEffect: 
+    attackMethod_Type: 0
     floatState:
       time: 0
       upTime: {x: 0, y: 0}
@@ -271,13 +274,13 @@ MonoBehaviour:
       rate: 0
     sustainedInjury:
       damage: 0
-    isDemSummon: 0
   attributeTime: 0
   floatingState: 0
   hitState: 0
   isFly: 0
   decelerationRatioX: 2
   decelerationRatioY: 15
+  rotateCenterHeight: 1
   startFlyAngle: 15
   flyingRotateSpeedRange: {x: 15, y: 45}
   compressionDegree: 0.8
@@ -314,7 +317,9 @@ MonoBehaviour:
     attackValue: 0
     damage: 0
     attackDir: {x: 0, y: 0, z: 0}
+    effect: {fileID: 0}
     attackEffect: 
+    attackMethod_Type: 0
     floatState:
       time: 0
       upTime: {x: 0, y: 0}
@@ -355,7 +360,6 @@ MonoBehaviour:
       rate: 0
     sustainedInjury:
       damage: 0
-    isDemSummon: 0
   attackFromData: {fileID: 0}
   hitStunTime: 0
   canHitStun: 0
@@ -581,7 +585,6 @@ MonoBehaviour:
   m_EditorClassIdentifier: 
   rb: {fileID: 0}
   moveCharacter: {fileID: 0}
-  canOnGiant: 0
   haveGravity: 1
   trigGroundList: []
   platform: {fileID: 0}
@@ -664,8 +667,6 @@ MonoBehaviour:
   meshRenderer: {fileID: 0}
   ani: {fileID: 3333436509305836838}
   totalDieKeepTime: 2.0666668
-  totalAttack_summonTime: 0.6666667
-  totalAttack_marchTime: 4
   showInjuryNum: 0
   injuryNumText: {fileID: 6467251191553420251, guid: 9b37289f93ea76745ab2cefb79a93e3c, type: 3}
   injuryNumTextSummon: {fileID: 0}
@@ -682,13 +683,14 @@ MonoBehaviour:
   totalHp: 4000
   hp: 0
   canFly: 0
+  canControlFly: 0
   nowCanFly: 0
+  canNotShotDown: 1
   canNotAddForce: 0
   canNotChangeHurt: 0
   isDie: 0
   isRevive: 0
   invincibleTime: 0
-  isBeHitBySummonAttack: 0
   statePre: {fileID: 4272231268506418309, guid: cf5ca93704f49c744b0d6cfc2cd25a01, type: 3}
   ls: {fileID: 0}
   isInSoulTower: 0
@@ -749,11 +751,9 @@ MonoBehaviour:
   isBack: 0
   baseSortingOrder: 100
   runSpeed: 0
-  summonTime: 0
   isReturnSoulTower: 0
   origSoulPos: {x: 0, y: 0, z: 0}
   isRecorded: 0
-  curAttackID: 0
   adsorbSpeed: 0
   adsorbTarget: {x: 0, y: 0, z: 0}
   effectPrefab: {fileID: 0}
@@ -782,101 +782,24 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: 565fb65a48a8ef648b3096d46e15efd9, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
-  attackKeys:
-  - aniName: attack_march
-    keys:
-    - attackMethod: 0
-      attackType: 0
-      startKeyName: attack_on
-      startKeyTime: 1.4000001
-      endType: 1
-      endKeyName: attack_off
-      endKeyTime: 1.6000001
-  - aniName: attack_summon
-    keys:
-    - attackMethod: 0
-      attackType: 0
-      startKeyName: attack_on
-      startKeyTime: 0
-      endType: 1
-      endKeyName: attack_off
-      endKeyTime: 0.26666668
-  keyTimes: []
-  attackTime: 0
-  attackKeyCount: 0
-  nextStartKeyTime: 0
-  nextEndKeyTime: 0
-  curKeyNum: 0
-  attackType: 0
-  attackInterval: 0
-  curDamage: 0
-  canHitFly: 1
-  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}
-      ControlOrder: 0
-    blowUp:
-      directionType: 0
-      dir: {x: 0, y: 0, z: 0}
-      dirRandom: {x: 0, y: 0, z: 0}
-      force: 0
-      time: 0
-      haveLandingDamage: 0
-      landingDamageRate: 0
-      ControlOrder: 0
-    shotDown:
-      directionType: 0
-      dir: {x: 0, y: 0, z: 0}
-      dirRandom: {x: 0, y: 0, z: 0}
-      force: 0
-      time: 0
-      haveLandingDamage: 0
-      landingDamage: 0
-      ControlOrder: 0
-    weak:
-      time: 0
-      ControlOrder: 0
-    armorPiercing:
-      rate: 0
-    vulnerable:
-      rate: 0
-      time: 0
-    stackingWounds:
-      damage: 0
-      time: 0
-    changeDamage:
-      rate: 0
-    sustainedInjury:
-      damage: 0
-    isDemSummon: 0
+  attackInterval: 4
   addAttackEffect: {fileID: 0}
-  skill: {fileID: 0}
-  attackDistance: 0
-  attackTrigger: {fileID: 7729941002223262554}
   isAttackTriggerOn: 0
-  bulletPrefab: {fileID: 0}
-  shootPos: []
-  shootTrack: 0
-  shootAlwaysTrack: 0
   targetTypes: 040000000500000006000000
-  beTargetCharacter: []
-  attackMethod:
-  - id: 0
-    attackName: "\u8D77\u624B\u5F0F\u6376\u5730"
+  attackSummonId: 0
+  attackMarchId: 0
+  summonTime:
+  - 0.5
+  attackMethod_summon:
+  - attackName: attack_summon
     attackType: 0
     attackInfo:
-      attackValue: 0
-      damage: 50
+      attackValue: 13
+      damage: 10
       attackDir: {x: 0, y: 0, z: 0}
-      attackEffect: 
+      effect: {fileID: 0}
+      attackEffect: 01000000
+      attackMethod_Type: 0
       floatState:
         time: 0
         upTime: {x: 0, y: 0}
@@ -886,12 +809,12 @@ MonoBehaviour:
         ControlOrder: 0
       blowUp:
         directionType: 0
-        dir: {x: 0, y: 0, z: 0}
-        dirRandom: {x: 0, y: 0, z: 0}
-        force: 0
-        time: 0
-        haveLandingDamage: 0
-        landingDamageRate: 0
+        dir: {x: -1, y: 1, z: 0}
+        dirRandom: {x: 0.5, y: 0.5, z: 0}
+        force: 110
+        time: 2
+        haveLandingDamage: 1
+        landingDamageRate: 2.5
         ControlOrder: 0
       shotDown:
         directionType: 0
@@ -917,16 +840,13 @@ MonoBehaviour:
         rate: 0
       sustainedInjury:
         damage: 0
-      isDemSummon: 0
     attackTrigger: {fileID: 7729941002223262554}
+    needToChange: 0
     attackDistance: 3
     maxAttackDis: 0
     minAttackDis: 0
-    needToChange: 0
     searchMode: 0
-    targetTypes: 040000000500000006000000
     canHitFly: 1
-    armorPiercing: 0
     bulletPrefab: {fileID: 0}
     shootPos: []
     maxUpAngle: 0
@@ -934,14 +854,16 @@ MonoBehaviour:
     shootTrack: 0
     shootAlwaysTrack: 0
     skill: {fileID: 0}
-  - id: 1
-    attackName: "\u884C\u519B\u5F0F\u6376\u5730"
+  attackMethod_march:
+  - attackName: attack_march
     attackType: 0
     attackInfo:
       attackValue: 0
-      damage: 50
+      damage: 2
       attackDir: {x: 0, y: 0, z: 0}
+      effect: {fileID: 0}
       attackEffect: 
+      attackMethod_Type: 0
       floatState:
         time: 0
         upTime: {x: 0, y: 0}
@@ -982,16 +904,13 @@ MonoBehaviour:
         rate: 0
       sustainedInjury:
         damage: 0
-      isDemSummon: 0
     attackTrigger: {fileID: 7729941002223262554}
+    needToChange: 0
     attackDistance: 3
     maxAttackDis: 0
     minAttackDis: 0
-    needToChange: 0
     searchMode: 0
-    targetTypes: 040000000500000006000000
     canHitFly: 1
-    armorPiercing: 0
     bulletPrefab: {fileID: 0}
     shootPos: []
     maxUpAngle: 0
@@ -1000,14 +919,15 @@ MonoBehaviour:
     shootAlwaysTrack: 0
     skill: {fileID: 0}
   curAttackMethod:
-    id: 0
     attackName: 
     attackType: 0
     attackInfo:
       attackValue: 0
       damage: 0
       attackDir: {x: 0, y: 0, z: 0}
+      effect: {fileID: 0}
       attackEffect: 
+      attackMethod_Type: 0
       floatState:
         time: 0
         upTime: {x: 0, y: 0}
@@ -1048,16 +968,13 @@ MonoBehaviour:
         rate: 0
       sustainedInjury:
         damage: 0
-      isDemSummon: 0
     attackTrigger: {fileID: 0}
+    needToChange: 0
     attackDistance: 0
     maxAttackDis: 0
     minAttackDis: 0
-    needToChange: 0
     searchMode: 0
-    targetTypes: 
     canHitFly: 0
-    armorPiercing: 0
     bulletPrefab: {fileID: 0}
     shootPos: []
     maxUpAngle: 0
@@ -1065,6 +982,32 @@ MonoBehaviour:
     shootTrack: 0
     shootAlwaysTrack: 0
     skill: {fileID: 0}
+  attackKeys:
+  - aniName: attack_march
+    keys:
+    - attackType: 0
+      startKeyName: attack_on
+      startKeyTime: 1.4000001
+      endType: 1
+      endKeyName: attack_off
+      endKeyTime: 1.6000001
+    totalTime: 4
+  - aniName: attack_summon
+    keys:
+    - attackType: 0
+      startKeyName: attack_on
+      startKeyTime: 0
+      endType: 1
+      endKeyName: attack_off
+      endKeyTime: 0.26666668
+    totalTime: 0.6666667
+  keyTimes: []
+  attackTime: 0
+  attackKeyCount: 0
+  nextStartKeyTime: 0
+  nextEndKeyTime: 0
+  curKeyNum: 0
+  beTargetCharacter: []
 --- !u!1 &6139679835290116115
 GameObject:
   m_ObjectHideFlags: 0
@@ -1307,8 +1250,6 @@ MeshRenderer:
   m_Materials:
   - {fileID: 2100000, guid: 466a6130b6c56614caef9c2f5961b3a8, type: 2}
   - {fileID: 2100000, guid: dc7a2704fc39fb24997c9f6279033f5c, type: 2}
-  - {fileID: 2100000, guid: 466a6130b6c56614caef9c2f5961b3a8, type: 2}
-  - {fileID: 2100000, guid: dc7a2704fc39fb24997c9f6279033f5c, type: 2}
   m_StaticBatchInfo:
     firstSubMesh: 0
     subMeshCount: 0

+ 0 - 12
ActionTowerDefense/Assets/Scripts/Bullet.cs

@@ -167,18 +167,6 @@ public class Bullet : MonoBehaviour
                 trigedObjs.Add(hitTrigger);
                 if (Util.CheckCanHit(owner.tag, hitTrigger.owner.tag) && !hitTrigger.owner.isDie)
                 {
-                    //是否被起手式攻击
-                    if (owner.CompareTag("Demonic")
-                        && attackInfo.attackMethod_Type == AttackMethod_Type.Attack_Summon)
-                    {
-                        hitTrigger.owner.isBeHitBySummonAttack = true;
-                    }
-                    else
-                    {
-                        hitTrigger.owner.isBeHitBySummonAttack = false;
-                    }
-
-
                     hitTrigger.BeHit(attackInfo, owner);
                     BeHitEffect(other, hitTrigger);
                     if (hitTrigger.owner.debugAttackFrom)

+ 0 - 10
ActionTowerDefense/Assets/Scripts/Bullet_Ray.cs

@@ -196,16 +196,6 @@ public class Bullet_Ray : Bullet
                 if (Util.CheckCanHit(owner.tag, hitTrigger.owner.tag) && !hitTrigger.owner.isDie)
                 {
                     float dir = transform.position.x < hitTrigger.transform.position.x ? -1 : 1;
-                    //ÊDZ»ÆðÊÖʽ¹¥»÷µÄ
-                    if (owner.CompareTag("Demonic")
-                        && attackInfo.attackMethod_Type == AttackMethod_Type.Attack_Summon)
-                    {
-                        hitTrigger.owner.isBeHitBySummonAttack = true;
-                    }
-                    else
-                    {
-                        hitTrigger.owner.isBeHitBySummonAttack = false;
-                    }
                     hitTrigger.BeHit(attackInfo, owner);
                     BeHitEffect(other, hitTrigger);
                     if (hitTrigger.owner.debugAttackFrom)

+ 12 - 23
ActionTowerDefense/Assets/Scripts/Characters/AttackTrigger.cs

@@ -42,30 +42,19 @@ public class AttackTrigger : MonoBehaviour
                 {
                     return;
                 }
+                trigedObjs.Add(hitTrigger);
+                hitTrigger.BeHit(attackInfo, owner);
+                if (hitTrigger.owner.debugAttackFrom)
                 {
-                    //ÊÇ·ñ±»ÆðÊÖʽ¹¥»÷µÄ
-                    if (owner.CompareTag("Demonic") && attackInfo.attackMethod_Type == AttackMethod_Type.Attack_Summon)
-                    {
-                        hitTrigger.owner.isBeHitBySummonAttack = true;
-                    }
-                    else
-                    {
-                        hitTrigger.owner.isBeHitBySummonAttack = false;
-                    }
-                    trigedObjs.Add(hitTrigger);
-                    hitTrigger.BeHit(attackInfo, owner);
-                    if (hitTrigger.owner.debugAttackFrom)
-                    {
-                        hitTrigger.owner.DebugAttackFrom(owner.name, attackInfo.damage);
-                    }
-                    if (owner.GetComponent<Demonic>())
-                    {
-                        hitTrigger.attackerID = owner.GetComponent<Demonic>().id;
-                    }
-                    if (isSingleAttack)
-                    {
-                        cantSingleAttack = true;
-                    }
+                    hitTrigger.owner.DebugAttackFrom(owner.name, attackInfo.damage);
+                }
+                if (owner.GetComponent<Demonic>())
+                {
+                    hitTrigger.attackerID = owner.GetComponent<Demonic>().id;
+                }
+                if (isSingleAttack)
+                {
+                    cantSingleAttack = true;
                 }
             }
         }

+ 5 - 20
ActionTowerDefense/Assets/Scripts/Characters/Character.cs

@@ -104,8 +104,6 @@ public class Character : MonoBehaviour
     public bool isRevive;           //从虚弱状态恢复中
     [DisplayOnly]
     public float invincibleTime;    //无敌时间
-    [HideInInspector]
-    public bool isBeHitBySummonAttack;      //受到来自起手式的攻击
 
     [Header("状态显示(临时)")]
     public GameObject statePre;
@@ -244,24 +242,11 @@ public class Character : MonoBehaviour
         if (showInjuryNum)
         {
             GameObject injuryNum;
-            //是起手式
-            if (isBeHitBySummonAttack)
-            {
-                injuryNum = PoolManager.Instantiate(injuryNumTextSummon);
-                injuryNum.transform.position = new Vector3(
-                    transform.position.x + injuryNumPos_summon.x + Random.Range(-injuryNumRandom_summon.x / 2f, injuryNumRandom_summon.x / 2f),
-                    transform.position.y + injuryNumPos_summon.y + Random.Range(-injuryNumRandom_summon.y / 2f, injuryNumRandom_summon.y / 2f),
-                    transform.position.z);
-            }
-            //不是起手式
-            else
-            {
-                injuryNum = PoolManager.Instantiate(injuryNumText);
-                injuryNum.transform.position = injuryNum.transform.position = new Vector3(
-                    transform.position.x + injuryNumPos_march.x + Random.Range(-injuryNumRandom_march.x / 2f, injuryNumRandom_march.x / 2f),
-                    transform.position.y + injuryNumPos_march.y + Random.Range(-injuryNumRandom_march.y / 2f, injuryNumRandom_march.y / 2f),
-                    transform.position.z);
-            }
+            injuryNum = PoolManager.Instantiate(injuryNumText);
+            injuryNum.transform.position = injuryNum.transform.position = new Vector3(
+                transform.position.x + injuryNumPos_march.x + Random.Range(-injuryNumRandom_march.x / 2f, injuryNumRandom_march.x / 2f),
+                transform.position.y + injuryNumPos_march.y + Random.Range(-injuryNumRandom_march.y / 2f, injuryNumRandom_march.y / 2f),
+                transform.position.z);
 
             TextMeshProUGUI text = injuryNum.GetComponentInChildren<TextMeshProUGUI>();
             text.text = damage.ToString();

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

@@ -320,7 +320,7 @@ public class MoveCharacter : Character
         {
             GameObject injuryNum;
             //ÊÇÆðÊÖʽ
-            if (isBeHitBySummonAttack)
+            if (attackFrom.CompareTag("Demonic") && attackInfo.attackMethod_Type == AttackMethod_Type.Attack_Summon)
             {
                 injuryNum = PoolManager.Instantiate(injuryNumTextSummon);
                 injuryNum.transform.position = new Vector3(