فهرست منبع

修复索敌距离bug

SZAND\msx_2 6 ماه پیش
والد
کامیت
308b721c90

+ 11 - 4
ActionTowerDefense/Assets/Resources/Prefab/Enemy/Enemy_1003.prefab

@@ -471,6 +471,8 @@ MonoBehaviour:
   totalAttack_summonTime: 1.8333334
   totalAttack_marchTime: 1.8333334
   dieKeepTime: 0
+  beHitDistance: 3
+  attackDis: 0
   rb: {fileID: 5440846222648032765}
   bodyTrans: {fileID: 6459001683917408033}
   beSearchTrigger: {fileID: 4259433079752244006}
@@ -562,10 +564,6 @@ MonoBehaviour:
   wallDamage: 0
   type: -1
   searchState: 0
-  attackDistance: 6
-  maxAttackDis: 0
-  minAttackDis: 0
-  needToChange: 0
   attackRatio: 0
   dropSoulMax: 4
   dropSoulMin: 4
@@ -657,6 +655,7 @@ MonoBehaviour:
   skill: {fileID: 0}
   attackEffect: {fileID: 0}
   effect: {fileID: 0}
+  attackDistance: 0
   attackTrigger: {fileID: 7729941002223262554}
   isAttackTriggerOn: 0
   bulletPrefab: {fileID: 0}
@@ -697,6 +696,10 @@ MonoBehaviour:
       sustainedInjury:
         damage: 0
     attackTrigger: {fileID: 7729941002223262554}
+    attackDistance: 3
+    maxAttackDis: 0
+    minAttackDis: 0
+    needToChange: 0
     targetTypes: 010000000200000003000000
     canHitFly: 1
     armorPiercing: 0
@@ -738,6 +741,10 @@ MonoBehaviour:
       sustainedInjury:
         damage: 0
     attackTrigger: {fileID: 0}
+    attackDistance: 0
+    maxAttackDis: 0
+    minAttackDis: 0
+    needToChange: 0
     targetTypes: 
     canHitFly: 0
     armorPiercing: 0

+ 47 - 18
ActionTowerDefense/Assets/Resources/Prefab/MySoldier/Demonic_Giant_Yang.prefab

@@ -103,6 +103,10 @@ MonoBehaviour:
     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
@@ -523,6 +527,8 @@ MonoBehaviour:
   totalAttack_summonTime: 2.2
   totalAttack_marchTime: 4
   dieKeepTime: 0
+  beHitDistance: 3
+  attackDis: 0
   rb: {fileID: 5440846222648032765}
   bodyTrans: {fileID: 6459001683917408033}
   beSearchTrigger: {fileID: 4259433079752244006}
@@ -564,10 +570,13 @@ MonoBehaviour:
   attributeStatus: {fileID: 0}
   extraRiseGravity: -28.8
   extraFallGravity: -14.4
-  canMove: 1
   moveSpeed: 2
+  needToAdjustFlyHeight: 0
   flyHeight: 0
-  flyUpSpeed: 10
+  maxFlyHeight: 0
+  minFlyHeight: 0
+  flyUpTime: 0
+  isAdjustHeight: 0
   totalBeRepelValue: 100
   beRepelValue: 0
   weakTime: 0
@@ -581,16 +590,7 @@ MonoBehaviour:
   decelerationRatio: 1
   comaTime: 5
   pastComaTime: 0
-  floatState: 0
-  maxTime: 1.5
-  minTime: 0.1
-  maxHeight: 12
-  minHeight: 7
   floatTime: 10
-  maxRotateSpeed: 20
-  minRotateSpeed: 5
-  isFloat: 0
-  normalFallSpeed: 10
   effect: {fileID: 0}
   soulPrefab: {fileID: 1723151111827507807, guid: e2b65aa482f2f1447a4074208d72b778, type: 3}
   soulStartSpeed: 1
@@ -618,10 +618,6 @@ MonoBehaviour:
   isRecorded: 0
   searchState: 0
   soulCollector: {fileID: 0}
-  attackDistance: 3
-  maxAttackDis: 0
-  minAttackDis: 0
-  needToChange: 0
   curAttackID: 0
   adsorbSpeed: 0.5
   adsorbTarget: {x: 0, y: 0, z: 0}
@@ -692,6 +688,10 @@ MonoBehaviour:
     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
@@ -712,6 +712,7 @@ MonoBehaviour:
   skill: {fileID: 0}
   attackEffect: {fileID: 0}
   effect: {fileID: 0}
+  attackDistance: 0
   attackTrigger: {fileID: 7729941002223262554}
   isAttackTriggerOn: 0
   bulletPrefab: {fileID: 0}
@@ -731,6 +732,10 @@ MonoBehaviour:
       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
@@ -748,6 +753,10 @@ MonoBehaviour:
       sustainedInjury:
         damage: 0
     attackTrigger: {fileID: 7729941002223262554}
+    attackDistance: 3
+    maxAttackDis: 0
+    minAttackDis: 0
+    needToChange: 0
     targetTypes: 040000000500000006000000
     canHitFly: 1
     armorPiercing: 0
@@ -767,6 +776,10 @@ MonoBehaviour:
       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
@@ -784,6 +797,10 @@ MonoBehaviour:
       sustainedInjury:
         damage: 0
     attackTrigger: {fileID: 7729941002223262554}
+    attackDistance: 3
+    maxAttackDis: 0
+    minAttackDis: 0
+    needToChange: 0
     targetTypes: 040000000500000006000000
     canHitFly: 1
     armorPiercing: 0
@@ -804,6 +821,10 @@ MonoBehaviour:
       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
@@ -821,6 +842,10 @@ MonoBehaviour:
       sustainedInjury:
         damage: 0
     attackTrigger: {fileID: 0}
+    attackDistance: 0
+    maxAttackDis: 0
+    minAttackDis: 0
+    needToChange: 0
     targetTypes: 
     canHitFly: 0
     armorPiercing: 0
@@ -843,13 +868,15 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   curSpecialStates: ffffffff
-  strikeStunTime: 0
-  decelerationRatioX: 2
-  decelerationRatioY: 15
+  attributeTime: 0
   resistances:
+    Float: 0
     BlowUp: 0
     ShotDown: 0
     Stun: 0
+  decelerationRatioX: 2
+  decelerationRatioY: 15
+  floatingState: 0
 --- !u!1 &6139679835290116115
 GameObject:
   m_ObjectHideFlags: 0
@@ -1025,6 +1052,8 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   imgHp: {fileID: 891910447640254832}
+  pc: {fileID: 0}
+  points: []
 --- !u!1 &7208291223413765209
 GameObject:
   m_ObjectHideFlags: 0

+ 3 - 3
ActionTowerDefense/Assets/Resources/Prefab/MySoldier/Demonic_Giant_Yin.prefab

@@ -527,7 +527,7 @@ MonoBehaviour:
   totalAttack_summonTime: 2.2
   totalAttack_marchTime: 4
   dieKeepTime: 0
-  beHitDistance: 0
+  beHitDistance: 3
   attackDis: 0
   rb: {fileID: 5440846222648032765}
   bodyTrans: {fileID: 6459001683917408033}
@@ -753,7 +753,7 @@ MonoBehaviour:
       sustainedInjury:
         damage: 0
     attackTrigger: {fileID: 7729941002223262554}
-    attackDistance: 0
+    attackDistance: 3
     maxAttackDis: 0
     minAttackDis: 0
     needToChange: 0
@@ -797,7 +797,7 @@ MonoBehaviour:
       sustainedInjury:
         damage: 0
     attackTrigger: {fileID: 7729941002223262554}
-    attackDistance: 0
+    attackDistance: 3
     maxAttackDis: 0
     minAttackDis: 0
     needToChange: 0

+ 0 - 1
ActionTowerDefense/Assets/Scripts/Characters/AttackController.cs

@@ -423,7 +423,6 @@ public class AttackController : MonoBehaviour
                 owner.Turn();
             }
         }
-        ChooseAttack(id);
         owner.ani.Play("attack_march", 0, 0);
         if (attackType == AttackType.Shoot)
         {

+ 2 - 0
ActionTowerDefense/Assets/Scripts/Characters/Demonic.cs

@@ -52,6 +52,7 @@ public class Demonic : MoveCharacter
     private void OnDisable()
     {
         PlayersInput.instance[playerID].OnDemonicRecycle(this);
+        curAttackID = 0;
     }
 
     public override void FixedUpdate()
@@ -575,6 +576,7 @@ public class Demonic : MoveCharacter
                 {
                     attackController.effect.SetActive(false);
                 }
+                attackController.ChooseAttack(curAttackID);
                 break;
             case CharacterState.Die:
                 isDie = false;

+ 3 - 0
ActionTowerDefense/Assets/Scripts/Characters/Enemy.cs

@@ -85,6 +85,8 @@ public class Enemy : MoveCharacter
         moveSpeed = Random.Range(minMoveSpeed, maxMoveSpeed);
 
         ChangeSearchState(SearchState.NoTarget);
+        curAttackID = 0;
+        attackController.ChooseAttack(curAttackID);
     }
 
     public override void FixedUpdate()
@@ -425,6 +427,7 @@ public class Enemy : MoveCharacter
             //case CharacterState.Hurt:
             //    break;
             case CharacterState.Attack:
+                attackController.ChooseAttack(curAttackID);
                 break;
             case CharacterState.Die:
                 isDie = false;

+ 8 - 0
ActionTowerDefense/Assets/Scripts/HapticResponce.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 53af740a325812b44bf7fdb72b0cec8a
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: