LAPTOP-OM1V99U2\永远de小亡灵 преди 1 година
родител
ревизия
d754ce93e6

+ 10 - 9
ActionTowerDefense/Assets/Resources/Prefab/ESpirits_Assassin.prefab

@@ -184,7 +184,7 @@ MonoBehaviour:
   m_EditorClassIdentifier: 
   time: 0
   attackCD: 5
-  readyCD: 2
+  readyCD: 1.5
   hateDistance: 10
   state: 0
   enemy: {fileID: -677743004047987606}
@@ -200,6 +200,7 @@ MonoBehaviour:
   body: {fileID: 5216717017252562314}
   aim: {fileID: 6373916053725309541}
   aimDistance: 20
+  character: {x: 0, y: 0, z: 0}
 --- !u!54 &2437299196472462355
 Rigidbody:
   m_ObjectHideFlags: 0
@@ -215,7 +216,7 @@ Rigidbody:
   m_IsKinematic: 0
   m_Interpolate: 0
   m_Constraints: 120
-  m_CollisionDetection: 1
+  m_CollisionDetection: 2
 --- !u!114 &-677743004047987606
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -246,17 +247,17 @@ MonoBehaviour:
   totalHp: 1000
   hp: 0
   attack1Infos:
-  - damage: 400
-    attackDir: {x: 2, y: 1, z: 0}
+  - damage: 200
+    attackDir: {x: 0, y: 1, z: 0}
     force: 100
     changeHurt: 1
-    repelValue: 100
+    repelValue: 10
   attack2Infos:
   - damage: 50
     attackDir: {x: -1, y: 0, z: 0}
     force: 100
     changeHurt: 0
-    repelValue: 50
+    repelValue: 10
   attackTriggers:
   - {fileID: 4347565098670608659}
   attackType: 0
@@ -280,7 +281,7 @@ MonoBehaviour:
   foot: {fileID: 2437299196663985756}
   extraRiseGravity: -28.8
   extraFallGravity: -14.4
-  moveSpeed: 40
+  moveSpeed: 15
   beRepelValue: 0
   totalBeRepelValue: 30
   weakTime: 0
@@ -830,7 +831,7 @@ BoxCollider:
   m_IsTrigger: 1
   m_Enabled: 1
   serializedVersion: 2
-  m_Size: {x: 2.5, y: 2, z: 1}
+  m_Size: {x: 2.5, y: 3.11, z: 1}
   m_Center: {x: -1.5, y: 1, z: 0}
 --- !u!54 &8257178686841521685
 Rigidbody:
@@ -1181,7 +1182,7 @@ PrefabInstance:
       objectReference: {fileID: 0}
     - target: {fileID: 2762284929821138691, guid: b7051bb1545467c4b834bfe5db9c3029, type: 3}
       propertyPath: m_LocalPosition.y
-      value: 0
+      value: 1.02
       objectReference: {fileID: 0}
     - target: {fileID: 2762284929821138691, guid: b7051bb1545467c4b834bfe5db9c3029, type: 3}
       propertyPath: m_LocalPosition.z

+ 13 - 13
ActionTowerDefense/Assets/Scripts/Spirits/DashEffect.cs

@@ -58,19 +58,19 @@ public class DashEffect : MonoBehaviour
     //        }
     //    }
     //}
-    private void OnTriggerStay(Collider other)
-    {
-        if (isDash)
-        {
-            if (isEnemy && (other.gameObject.layer == 6 || other.gameObject.layer == 7)
-                && other.name == "BodyCollider")
-            {
-                Character character = other.GetComponentInParent<Character>();
-                DashAttack(character);
-            }
-            isDash = false;
-        }
-    }
+    //private void OnTriggerStay(Collider other)
+    //{
+    //    if (isDash)
+    //    {
+    //        if (isEnemy && (other.gameObject.layer == 6 || other.gameObject.layer == 7)
+    //            && other.name == "BodyCollider")
+    //        {
+    //            Character character = other.GetComponentInParent<Character>();
+    //            DashAttack(character);
+    //        }
+    //        isDash = false;
+    //    }
+    //}
     private void OnTriggerEnter(Collider other)
     {
         

+ 15 - 14
ActionTowerDefense/Assets/Scripts/Spirits/ESpirits_Assassin.cs

@@ -35,7 +35,7 @@ public class ESpirits_Assassin : MonoBehaviour
     public GameObject body;
     public GameObject aim;
     public float aimDistance;
-    public Character character;
+    public Vector3 character;
     private void Update()
     {
 
@@ -44,9 +44,9 @@ public class ESpirits_Assassin : MonoBehaviour
     public void ReadyToDash(Vector3 pos0, Vector3 pos1)
     {
         Vector3 target = (pos0 - pos1).normalized;
-        float distance = time / readyCD * aimDistance;
-        //float distance = aimDistance;
-        aim.transform.position = pos1 + target * distance / 2;
+        //float distance = time / readyCD * aimDistance;
+        float distance = aimDistance;
+        //aim.transform.position = pos1 + target * distance / 2;
         aim.transform.localScale =
             new Vector3(distance, 1, 1);
 
@@ -54,7 +54,7 @@ public class ESpirits_Assassin : MonoBehaviour
         float k = Mathf.Atan2(targetDir.y, targetDir.x) * Mathf.Rad2Deg;
         if (targetDir.x < 0)
         {
-            aim.transform.rotation = Quaternion.Euler(new Vector3(0, 0, k - 180));
+            aim.transform.rotation = Quaternion.Euler(new Vector3(0, 0, k));
             body.transform.localScale = new Vector3(1, 1, 1);
         }
         else
@@ -78,34 +78,34 @@ public class ESpirits_Assassin : MonoBehaviour
                     enemy.searchState = SearchState.InSearchScope;
                     enemy.ChangeState(CharacterState.Run);
                     
-                    character = enemy.targetCharacter;
+                    
                     state = AssassinState.FindPlayer;
                 }
                 break;
             case AssassinState.FindPlayer:
-                if (Vector3.Distance(transform.position, character.transform.position)
+                if (Vector3.Distance(transform.position, enemy.targetCharacter.transform.position)
                     < hateDistance)
                 {
-                    
+                    character = enemy.targetCharacter.transform.position;
                     enemy.ChangeState(CharacterState.Rush);
                     rb.velocity = Vector3.zero;
                     enemy.ani.Play("charge", 0, 0);
                     aim.SetActive(true);
-                    aimDistance = dashTime * dashSpeed;
+                    aimDistance = dashTime * dashSpeed/2;
                     state = AssassinState.ReadyToDash;
                 }
                 break;
             case AssassinState.ReadyToDash:
                 time += Time.deltaTime;
-                ReadyToDash(character.transform.position+Vector3.up,
-                    transform.position+Vector3.up);
+                ReadyToDash(character + Vector3.up,
+                    transform.position + Vector3.up);
                 if (time >= readyCD)
                 {
                     
                     dashEffect.isDash = true;
                     dashEffect.isDashAttack = true;
                     targetDir =
-                        (character.transform.position - transform.position).normalized;
+                        (character - transform.position).normalized;
                     enemy.ani.Play("attack_summon", 0, 0);
                     aim.SetActive(false);
                     aim.transform.localScale = Vector3.one;
@@ -152,7 +152,7 @@ public class ESpirits_Assassin : MonoBehaviour
                 break;
             case AssassinState.Down:
                
-                if (transform.position.y < 1)
+                if (transform.position.y < 0)
                 {
                     enemy.ani.Play("fall_end", 0, 0);
 
@@ -161,8 +161,9 @@ public class ESpirits_Assassin : MonoBehaviour
                 {
                     Dash();
                 }
-                if (enemy.foot.TrigGround)
+                if (enemy.foot.TrigGround|| transform.position.y < -1)
                 {
+                    transform.position = new Vector3(transform.position.x, -1, 0);
                     body.transform.rotation = Quaternion.Euler(Vector3.zero);
                     state = AssassinState.Finish;
 

+ 58 - 13
ActionTowerDefense/GenerateDatas/json/cfgcreateenemy.json

@@ -1,8 +1,8 @@
 [
   {
     "ID": 1,
-    "EnemyID": 3,
-    "Count": 2,
+    "EnemyID": 4,
+    "Count": 3,
     "Time": 5,
     "TimeInterval": 2,
     "Position": [
@@ -32,8 +32,8 @@
   {
     "ID": 3,
     "EnemyID": 1,
-    "Count": 7,
-    "Time": 30,
+    "Count": 10,
+    "Time": 20,
     "TimeInterval": 2,
     "Position": [
       0,
@@ -47,7 +47,7 @@
   {
     "ID": 4,
     "EnemyID": 1,
-    "Count": 10,
+    "Count": 15,
     "Time": 40,
     "TimeInterval": 2,
     "Position": [
@@ -62,7 +62,7 @@
   {
     "ID": 5,
     "EnemyID": 2,
-    "Count": 2,
+    "Count": 30,
     "Time": 50,
     "TimeInterval": 2,
     "Position": [
@@ -77,7 +77,7 @@
   {
     "ID": 6,
     "EnemyID": 2,
-    "Count": 50,
+    "Count": 10,
     "Time": 100,
     "TimeInterval": 0.5,
     "Position": [
@@ -93,7 +93,7 @@
     "ID": 7,
     "EnemyID": 3,
     "Count": 20,
-    "Time": 150,
+    "Time": 200,
     "TimeInterval": 2,
     "Position": [
       0,
@@ -107,8 +107,8 @@
   {
     "ID": 8,
     "EnemyID": 3,
-    "Count": 4,
-    "Time": 200,
+    "Count": 30,
+    "Time": 250,
     "TimeInterval": 2,
     "Position": [
       0,
@@ -122,7 +122,7 @@
   {
     "ID": 9,
     "EnemyID": 1,
-    "Count": 10,
+    "Count": 20,
     "Time": 300,
     "TimeInterval": 2,
     "Position": [
@@ -137,8 +137,8 @@
   {
     "ID": 10,
     "EnemyID": 2,
-    "Count": 5,
-    "Time": 350,
+    "Count": 40,
+    "Time": 340,
     "TimeInterval": 2,
     "Position": [
       0,
@@ -148,5 +148,50 @@
     "YRandomRange": 4,
     "AttackRatio": 2.8,
     "HPRatio": 1.9
+  },
+  {
+    "ID": 11,
+    "EnemyID": 3,
+    "Count": 20,
+    "Time": 450,
+    "TimeInterval": 2,
+    "Position": [
+      0,
+      0,
+      0
+    ],
+    "YRandomRange": 0,
+    "AttackRatio": 3,
+    "HPRatio": 2
+  },
+  {
+    "ID": 12,
+    "EnemyID": 1,
+    "Count": 30,
+    "Time": 500,
+    "TimeInterval": 2,
+    "Position": [
+      0,
+      0,
+      0
+    ],
+    "YRandomRange": 0,
+    "AttackRatio": 3.2,
+    "HPRatio": 2.1
+  },
+  {
+    "ID": 13,
+    "EnemyID": 2,
+    "Count": 15,
+    "Time": 520,
+    "TimeInterval": 2,
+    "Position": [
+      0,
+      3,
+      0
+    ],
+    "YRandomRange": 4,
+    "AttackRatio": 0,
+    "HPRatio": 0
   }
 ]

+ 12 - 0
ActionTowerDefense/GenerateDatas/json/cfgenemy.json

@@ -34,5 +34,17 @@
       110
     ],
     "SortingOrder": 2000
+  },
+  {
+    "ID": 4,
+    "EnemyPrefab": "Prefab/ESpirits_Assassin",
+    "HP": 1000,
+    "Attack1": [
+      200
+    ],
+    "Attack2": [
+      50
+    ],
+    "SortingOrder": 3000
   }
 ]

+ 12 - 12
ActionTowerDefense/Luban/.cache.meta

@@ -1,12 +1,12 @@
-H:/UnityProject/ActionTowerDefense/ActionTowerDefense/Assets/Gen/CfgCreateEnemy.cs,3A9B470F9A1FA351330EA275C82C399,1404,1711097150748
-H:/UnityProject/ActionTowerDefense/ActionTowerDefense/Assets/Gen/CfgEnemy.cs,FDE1CE1B09C67F343EE84B2F88F27A6,1820,1711369259455
-H:/UnityProject/ActionTowerDefense/ActionTowerDefense/Assets/Gen/SingleCreateEnemyConfig.cs,C7FC1E458E49806699423B1E827969,4365,1715603297245
-H:/UnityProject/ActionTowerDefense/ActionTowerDefense/Assets/Gen/SingleEnemyConfig.cs,52D50AA62346441E5CF6FB54B178584,3703,1711462762532
-H:/UnityProject/ActionTowerDefense/ActionTowerDefense/Assets/Gen/Tables.cs,912B477615DA4F7C6B7D4A0EE96B27A,1296,1711097150748
-H:/UnityProject/ActionTowerDefense/ActionTowerDefense/GenerateDatas/json/cfgcreateenemy.json,2C96AD358B8A92F9C01A1D576FA5A,2277,1715603297245
-H:/UnityProject/ActionTowerDefense/ActionTowerDefense/GenerateDatas/json/cfgenemy.json,136B6127249F9487CA3B7A3DA2AE54B2,548,1713152292685
-H:/UnityProject/ActionTowerDefense/ActionTowerDefense/Luban/Config/Datas/__beans__.xlsx,98987DA7288FEE34BCD08EA883D425E,9603,1711095806628
-H:/UnityProject/ActionTowerDefense/ActionTowerDefense/Luban/Config/Datas/__enums__.xlsx,647733322F7261DFA483C2DBE2D1F9A4,10293,1711095790814
-H:/UnityProject/ActionTowerDefense/ActionTowerDefense/Luban/Config/Datas/__tables__.xlsx,D1BC5823EBCE916872405D2DCDC896D,10232,1711369251824
-H:/UnityProject/ActionTowerDefense/ActionTowerDefense/Luban/Config/Datas/出怪表.xlsx,BAE1C9E122CA46EAB9914DE3D3B7BCE,10905,1715603290859
-H:/UnityProject/ActionTowerDefense/ActionTowerDefense/Luban/Config/Datas/怪物表.xlsx,E4D91D5BD20BD4CB11078A943BF63,9736,1713745044511
+D:/ActionTowerDefense/ActionTowerDefense/Assets/Gen/CfgCreateEnemy.cs,3A9B470F9A1FA351330EA275C82C399,1404,1720757251245
+D:/ActionTowerDefense/ActionTowerDefense/Assets/Gen/CfgEnemy.cs,FDE1CE1B09C67F343EE84B2F88F27A6,1820,1720757251245
+D:/ActionTowerDefense/ActionTowerDefense/Assets/Gen/SingleCreateEnemyConfig.cs,C7FC1E458E49806699423B1E827969,4365,1720757251246
+D:/ActionTowerDefense/ActionTowerDefense/Assets/Gen/SingleEnemyConfig.cs,52D50AA62346441E5CF6FB54B178584,3703,1720757251245
+D:/ActionTowerDefense/ActionTowerDefense/Assets/Gen/Tables.cs,912B477615DA4F7C6B7D4A0EE96B27A,1296,1720757251246
+D:/ActionTowerDefense/ActionTowerDefense/GenerateDatas/json/cfgcreateenemy.json,76928D973FE4C45E56B38881C3CDB82,2963,1721097905399
+D:/ActionTowerDefense/ActionTowerDefense/GenerateDatas/json/cfgenemy.json,696070BE371FE5F8D8563279C9CC86D,737,1721096794552
+D:/ActionTowerDefense/ActionTowerDefense/Luban/Config/Datas/__beans__.xlsx,98987DA7288FEE34BCD08EA883D425E,9603,1719819418545
+D:/ActionTowerDefense/ActionTowerDefense/Luban/Config/Datas/__enums__.xlsx,647733322F7261DFA483C2DBE2D1F9A4,10293,1719819418545
+D:/ActionTowerDefense/ActionTowerDefense/Luban/Config/Datas/__tables__.xlsx,D1BC5823EBCE916872405D2DCDC896D,10232,1719819418546
+D:/ActionTowerDefense/ActionTowerDefense/Luban/Config/Datas/出怪表.xlsx,89549486E9C6A159BC3A76DD3B2F116,10452,1721097899435
+D:/ActionTowerDefense/ActionTowerDefense/Luban/Config/Datas/怪物表.xlsx,78A66BCEEED3AB9DF3C119A777FE38,9817,1721096784457

BIN
ActionTowerDefense/Luban/Config/Datas/出怪表.xlsx


BIN
ActionTowerDefense/Luban/Config/Datas/怪物表.xlsx