浏览代码

skeletonData读取转写存储数据and动画工作流优化

SZAND\msx_2 7 月之前
父节点
当前提交
d9b39e1217
共有 37 个文件被更改,包括 931 次插入281 次删除
  1. 15 7
      ActionTowerDefense/Assets/Resources/Prefab/Enemy/ESpirits_Assassin.prefab
  2. 16 8
      ActionTowerDefense/Assets/Resources/Prefab/Enemy/ESpirits_Cook.prefab
  3. 91 14
      ActionTowerDefense/Assets/Resources/Prefab/Enemy/ESpirits_Float.prefab
  4. 16 8
      ActionTowerDefense/Assets/Resources/Prefab/Enemy/ESpirits_Invisible.prefab
  5. 32 8
      ActionTowerDefense/Assets/Resources/Prefab/Enemy/Enemy_11001.prefab
  6. 33 8
      ActionTowerDefense/Assets/Resources/Prefab/Enemy/Enemy_11002.prefab
  7. 16 8
      ActionTowerDefense/Assets/Resources/Prefab/Enemy/Enemy_11004.prefab
  8. 91 14
      ActionTowerDefense/Assets/Resources/Prefab/Enemy/Enemy_11005.prefab
  9. 16 8
      ActionTowerDefense/Assets/Resources/Prefab/Enemy/Enemy_11008.prefab
  10. 91 14
      ActionTowerDefense/Assets/Resources/Prefab/Enemy/Enemy_Arrow.prefab
  11. 15 7
      ActionTowerDefense/Assets/Resources/Prefab/Enemy/Enemy_Giant.prefab
  12. 16 8
      ActionTowerDefense/Assets/Resources/Prefab/Enemy/Enemy_Sword.prefab
  13. 0 0
      ActionTowerDefense/Assets/Resources/Prefab/MySoldier.meta
  14. 99 14
      ActionTowerDefense/Assets/Resources/Prefab/MySoldier/Demonic_Arrow.prefab
  15. 0 0
      ActionTowerDefense/Assets/Resources/Prefab/MySoldier/Demonic_Arrow.prefab.meta
  16. 15 7
      ActionTowerDefense/Assets/Resources/Prefab/MySoldier/Demonic_Giant.prefab
  17. 0 0
      ActionTowerDefense/Assets/Resources/Prefab/MySoldier/Demonic_Giant.prefab.meta
  18. 15 7
      ActionTowerDefense/Assets/Resources/Prefab/MySoldier/Demonic_Sword.prefab
  19. 0 0
      ActionTowerDefense/Assets/Resources/Prefab/MySoldier/Demonic_Sword.prefab.meta
  20. 15 7
      ActionTowerDefense/Assets/Resources/Prefab/MySoldier/Spirits_Assassin.prefab
  21. 0 0
      ActionTowerDefense/Assets/Resources/Prefab/MySoldier/Spirits_Assassin.prefab.meta
  22. 16 8
      ActionTowerDefense/Assets/Resources/Prefab/MySoldier/Spirits_Cook.prefab
  23. 0 0
      ActionTowerDefense/Assets/Resources/Prefab/MySoldier/Spirits_Cook.prefab.meta
  24. 91 14
      ActionTowerDefense/Assets/Resources/Prefab/MySoldier/Spirits_Float.prefab
  25. 0 0
      ActionTowerDefense/Assets/Resources/Prefab/MySoldier/Spirits_Float.prefab.meta
  26. 13 7
      ActionTowerDefense/Assets/Resources/Prefab/MySoldier/Spirits_Invisible.prefab
  27. 0 0
      ActionTowerDefense/Assets/Resources/Prefab/MySoldier/Spirits_Invisible.prefab.meta
  28. 30 9
      ActionTowerDefense/Assets/Scenes/Game.unity
  29. 65 39
      ActionTowerDefense/Assets/Scripts/AttackTrigger.cs
  30. 66 7
      ActionTowerDefense/Assets/Scripts/Character.cs
  31. 18 16
      ActionTowerDefense/Assets/Scripts/Demonic.cs
  32. 18 19
      ActionTowerDefense/Assets/Scripts/Enemy.cs
  33. 0 3
      ActionTowerDefense/Assets/Scripts/EnemyTower.cs
  34. 0 3
      ActionTowerDefense/Assets/Scripts/MoveCharacter.cs
  35. 1 1
      ActionTowerDefense/Assets/Scripts/PlayerController.cs
  36. 21 5
      ActionTowerDefense/Assets/Scripts/Spine/SkeletonDataReader.cs
  37. 0 3
      ActionTowerDefense/Assets/Scripts/Tower.cs

+ 15 - 7
ActionTowerDefense/Assets/Resources/Prefab/Enemy/ESpirits_Assassin.prefab

@@ -114,7 +114,7 @@ Animator:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 1090663073729466903}
-  m_Enabled: 1
+  m_Enabled: 0
   m_Avatar: {fileID: 0}
   m_Controller: {fileID: 9100000, guid: bbac8c2923279db41a359090938525b4, type: 2}
   m_CullingMode: 0
@@ -226,7 +226,11 @@ MonoBehaviour:
   mecanim: {fileID: 5617185463097218335}
   meshRenderer: {fileID: 0}
   ani: {fileID: 6496896669866891404}
-  aniCollider: {fileID: 7460010523729932468}
+  totalDieKeepTime: 0
+  totalAttack_summonTime: 0.5
+  totalAttack_marchTime: 0.5
+  attackKeys: []
+  dieKeepTime: 0
   rb: {fileID: 2437299196472462355}
   bodyTrans: {fileID: 2730232521377132808}
   beSearchTrigger: {fileID: 1317309795988277421}
@@ -249,13 +253,8 @@ MonoBehaviour:
   armor: 0
   ls: {fileID: 0}
   isInSoulTower: 0
-  totalDieKeepTime: 0
-  dieKeepTime: 0
   canHitFly: 0
   isNonAttack: 0
-  attackTime: 0
-  totalAttack_summonTime: 0.5
-  totalAttack_marchTime: 0.5
   attackType: 0
   bulletPrefab: {fileID: 0}
   shootPos: []
@@ -278,6 +277,13 @@ MonoBehaviour:
   armorPiercing: 0
   curDamage1: 
   curDamage2: 
+  attackTime: 0
+  attackKeyCount: 0
+  nextStartKeyTime: 0
+  nextEndKeyTime: 0
+  keyTimes: []
+  curKeyNum: 0
+  isAttackTriggerOn: 0
   targetTypes: 010000000300000002000000
   targetCharacter: {fileID: 0}
   attackTarget: {fileID: 0}
@@ -726,6 +732,8 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: 5eaed0a6b9d6fc6409bef80cf41a0a8e, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
+  isShoot: 0
+  type: 0
   owner: {fileID: 0}
   isSingleAttack: 0
   trigedObjs: []

+ 16 - 8
ActionTowerDefense/Assets/Resources/Prefab/Enemy/ESpirits_Cook.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
@@ -91,6 +91,8 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: 5eaed0a6b9d6fc6409bef80cf41a0a8e, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
+  isShoot: 0
+  type: 0
   owner: {fileID: 0}
   isSingleAttack: 0
   trigedObjs: []
@@ -667,7 +669,7 @@ Animator:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 5041915139224979942}
-  m_Enabled: 1
+  m_Enabled: 0
   m_Avatar: {fileID: 0}
   m_Controller: {fileID: 9100000, guid: 8991a641567365b46b1b2449a3788987, type: 2}
   m_CullingMode: 0
@@ -813,7 +815,11 @@ MonoBehaviour:
   mecanim: {fileID: 7573527827155227431}
   meshRenderer: {fileID: 0}
   ani: {fileID: 3333436509305836838}
-  aniCollider: {fileID: 2776251058442384869}
+  totalDieKeepTime: 0
+  totalAttack_summonTime: 0.5
+  totalAttack_marchTime: 0.5
+  attackKeys: []
+  dieKeepTime: 0
   rb: {fileID: 5440846222648032765}
   bodyTrans: {fileID: 6459001683917408033}
   beSearchTrigger: {fileID: 4259433079752244006}
@@ -836,13 +842,8 @@ MonoBehaviour:
   armor: 0
   ls: {fileID: 0}
   isInSoulTower: 0
-  totalDieKeepTime: 0
-  dieKeepTime: 0
   canHitFly: 1
   isNonAttack: 1
-  attackTime: 0
-  totalAttack_summonTime: 0.5
-  totalAttack_marchTime: 0.5
   attackType: 0
   bulletPrefab: {fileID: 0}
   shootPos: []
@@ -865,6 +866,13 @@ MonoBehaviour:
   armorPiercing: 0
   curDamage1: 
   curDamage2: 
+  attackTime: 0
+  attackKeyCount: 0
+  nextStartKeyTime: 0
+  nextEndKeyTime: 0
+  keyTimes: []
+  curKeyNum: 0
+  isAttackTriggerOn: 0
   targetTypes: 010000000300000004000000
   targetCharacter: {fileID: 0}
   attackTarget: {fileID: 0}

+ 91 - 14
ActionTowerDefense/Assets/Resources/Prefab/Enemy/ESpirits_Float.prefab

@@ -29,7 +29,7 @@ Transform:
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 6561999689701501378}
-  m_RootOrder: 4
+  m_RootOrder: 5
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!1 &1190225091429982147
 GameObject:
@@ -62,7 +62,7 @@ Transform:
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 6561999689701501378}
-  m_RootOrder: 3
+  m_RootOrder: 4
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!65 &8507032990732667563
 BoxCollider:
@@ -378,7 +378,7 @@ Transform:
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 6561999689701501378}
-  m_RootOrder: 5
+  m_RootOrder: 6
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!1 &2616922587087395095
 GameObject:
@@ -410,7 +410,7 @@ Transform:
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 6561999689701501378}
-  m_RootOrder: 2
+  m_RootOrder: 3
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!65 &7144185533164728569
 BoxCollider:
@@ -633,7 +633,7 @@ Transform:
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 6561999689701501378}
-  m_RootOrder: 1
+  m_RootOrder: 2
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!65 &6832657651774999176
 BoxCollider:
@@ -691,6 +691,7 @@ Transform:
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
   m_Children:
+  - {fileID: 5115447526665692784}
   - {fileID: 8639832132450015556}
   - {fileID: 5101632837952520453}
   - {fileID: 3215317859961215224}
@@ -709,7 +710,7 @@ Animator:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 6911591061214860228}
-  m_Enabled: 1
+  m_Enabled: 0
   m_Avatar: {fileID: 0}
   m_Controller: {fileID: 9100000, guid: 629ccc9002c46f04f95ee575f4573310, type: 2}
   m_CullingMode: 0
@@ -866,7 +867,7 @@ Transform:
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 6561999689701501378}
-  m_RootOrder: 6
+  m_RootOrder: 7
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!1 &8639832132450015563
 GameObject:
@@ -899,7 +900,7 @@ Transform:
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 6561999689701501378}
-  m_RootOrder: 0
+  m_RootOrder: 1
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!65 &8639832132450015557
 BoxCollider:
@@ -1020,7 +1021,11 @@ MonoBehaviour:
   mecanim: {fileID: 3354085511906294621}
   meshRenderer: {fileID: 0}
   ani: {fileID: 5978259926173120695}
-  aniCollider: {fileID: 6864986857343475389}
+  totalDieKeepTime: 0
+  totalAttack_summonTime: 0.5
+  totalAttack_marchTime: 0.5
+  attackKeys: []
+  dieKeepTime: 0
   rb: {fileID: 8639832132491289349}
   bodyTrans: {fileID: 5769591908339262981}
   beSearchTrigger: {fileID: 316813748882225178}
@@ -1043,13 +1048,8 @@ MonoBehaviour:
   armor: 0
   ls: {fileID: 0}
   isInSoulTower: 0
-  totalDieKeepTime: 0
-  dieKeepTime: 0
   canHitFly: 1
   isNonAttack: 0
-  attackTime: 0
-  totalAttack_summonTime: 0.5
-  totalAttack_marchTime: 0.5
   attackType: 1
   bulletPrefab: {fileID: 7473170563405908938, guid: 5a7a8caaf3e79ec4f814d34467f0bf46, type: 3}
   shootPos:
@@ -1074,6 +1074,13 @@ MonoBehaviour:
   armorPiercing: 0
   curDamage1: 
   curDamage2: 
+  attackTime: 0
+  attackKeyCount: 0
+  nextStartKeyTime: 0
+  nextEndKeyTime: 0
+  keyTimes: []
+  curKeyNum: 0
+  isAttackTriggerOn: 0
   targetTypes: 010000000300000002000000
   targetCharacter: {fileID: 0}
   attackTarget: {fileID: 0}
@@ -1204,3 +1211,73 @@ MonoBehaviour:
   downRushTime: 0
   finishRushTime: 0
   upFirstAfterWeaknessOrNot: 1
+--- !u!1 &8685077959943580725
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 5115447526665692784}
+  - component: {fileID: 8219038890055617890}
+  - component: {fileID: 6302563696363480178}
+  m_Layer: 20
+  m_Name: AttackTrigger
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 0
+--- !u!4 &5115447526665692784
+Transform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 8685077959943580725}
+  m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+  m_LocalPosition: {x: -8.01, y: 0, z: 0}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_ConstrainProportionsScale: 0
+  m_Children: []
+  m_Father: {fileID: 6561999689701501378}
+  m_RootOrder: 0
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!65 &8219038890055617890
+BoxCollider:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 8685077959943580725}
+  m_Material: {fileID: 0}
+  m_IsTrigger: 1
+  m_Enabled: 1
+  serializedVersion: 2
+  m_Size: {x: 2.8041406, y: 1.6068753, z: 2}
+  m_Center: {x: -1.4829297, y: 0.81343764, z: 0}
+--- !u!114 &6302563696363480178
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 8685077959943580725}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 5eaed0a6b9d6fc6409bef80cf41a0a8e, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  isShoot: 1
+  type: 0
+  owner: {fileID: 0}
+  isSingleAttack: 0
+  trigedObjs: []
+  damage: 0
+  force: {x: 0, y: 0, z: 0}
+  changeHurt: 0
+  repelValue: 0
+  offsetY: 1
+  hitRate: 1
+  onlyFlyCanWeak: 0

+ 16 - 8
ActionTowerDefense/Assets/Resources/Prefab/Enemy/ESpirits_Invisible.prefab

@@ -113,7 +113,7 @@ Animator:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 1090663073729466903}
-  m_Enabled: 1
+  m_Enabled: 0
   m_Avatar: {fileID: 0}
   m_Controller: {fileID: 0}
   m_CullingMode: 0
@@ -229,7 +229,11 @@ MonoBehaviour:
   mecanim: {fileID: 4509017029252731830}
   meshRenderer: {fileID: 5962745018198423514}
   ani: {fileID: 2559904981682034569}
-  aniCollider: {fileID: 7460010523729932468}
+  totalDieKeepTime: 0
+  totalAttack_summonTime: 0.5
+  totalAttack_marchTime: 0.5
+  attackKeys: []
+  dieKeepTime: 0
   rb: {fileID: 2437299196472462355}
   bodyTrans: {fileID: 2730232521377132808}
   beSearchTrigger: {fileID: 1317309795988277421}
@@ -252,13 +256,8 @@ MonoBehaviour:
   armor: 0
   ls: {fileID: 0}
   isInSoulTower: 0
-  totalDieKeepTime: 0
-  dieKeepTime: 0
   canHitFly: 0
   isNonAttack: 0
-  attackTime: 0
-  totalAttack_summonTime: 0.5
-  totalAttack_marchTime: 0.5
   attackType: 0
   bulletPrefab: {fileID: 0}
   shootPos: []
@@ -280,6 +279,13 @@ MonoBehaviour:
   armorPiercing: 0
   curDamage1: 
   curDamage2: 
+  attackTime: 0
+  attackKeyCount: 0
+  nextStartKeyTime: 0
+  nextEndKeyTime: 0
+  keyTimes: []
+  curKeyNum: 0
+  isAttackTriggerOn: 0
   targetTypes: 010000000300000002000000
   targetCharacter: {fileID: 0}
   attackTarget: {fileID: 0}
@@ -687,7 +693,7 @@ GameObject:
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 1
+  m_IsActive: 0
 --- !u!4 &3277761006413294872
 Transform:
   m_ObjectHideFlags: 0
@@ -728,6 +734,8 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: 5eaed0a6b9d6fc6409bef80cf41a0a8e, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
+  isShoot: 0
+  type: 0
   owner: {fileID: 0}
   isSingleAttack: 0
   trigedObjs: []

+ 32 - 8
ActionTowerDefense/Assets/Resources/Prefab/Enemy/Enemy_11001.prefab

@@ -124,7 +124,7 @@ GameObject:
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 1
+  m_IsActive: 0
 --- !u!4 &8550728524802026199
 Transform:
   m_ObjectHideFlags: 0
@@ -165,6 +165,8 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: 5eaed0a6b9d6fc6409bef80cf41a0a8e, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
+  isShoot: 0
+  type: 0
   owner: {fileID: 0}
   isSingleAttack: 1
   trigedObjs: []
@@ -226,7 +228,27 @@ MonoBehaviour:
   mecanim: {fileID: 5617185463097218335}
   meshRenderer: {fileID: 0}
   ani: {fileID: 6496896669866891404}
-  aniCollider: {fileID: 2250177594949393219}
+  totalDieKeepTime: 1
+  totalAttack_summonTime: 1.833
+  totalAttack_marchTime: 1.833
+  attackKeys:
+  - aniName: attack_summon
+    keys:
+    - attackType: 0
+      startKeyName: start
+      startKeyTime: 1
+      endType: 0
+      endKeyName: end
+      endKeyTime: 1.3
+  - aniName: attack_march
+    keys:
+    - attackType: 0
+      startKeyName: start
+      startKeyTime: 1
+      endType: 0
+      endKeyName: end
+      endKeyTime: 1.3
+  dieKeepTime: 0
   rb: {fileID: 2437299196472462355}
   bodyTrans: {fileID: 5075820377452290163}
   beSearchTrigger: {fileID: 6542925321707027015}
@@ -249,13 +271,8 @@ MonoBehaviour:
   armor: 0
   ls: {fileID: 0}
   isInSoulTower: 0
-  totalDieKeepTime: 0
-  dieKeepTime: 0
   canHitFly: 1
   isNonAttack: 0
-  attackTime: 0
-  totalAttack_summonTime: 0.5
-  totalAttack_marchTime: 0.5
   attackType: 0
   bulletPrefab: {fileID: 0}
   shootPos: []
@@ -278,6 +295,13 @@ MonoBehaviour:
   armorPiercing: 0
   curDamage1: 
   curDamage2: 
+  attackTime: 0
+  attackKeyCount: 0
+  nextStartKeyTime: 0
+  nextEndKeyTime: 0
+  keyTimes: []
+  curKeyNum: 0
+  isAttackTriggerOn: 0
   targetTypes: 010000000300000002000000
   targetCharacter: {fileID: 0}
   attackTarget: {fileID: 0}
@@ -825,7 +849,7 @@ Animator:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 6382412198167824060}
-  m_Enabled: 1
+  m_Enabled: 0
   m_Avatar: {fileID: 0}
   m_Controller: {fileID: 9100000, guid: 386ae4a82c0e57d42bb18d4b04fb6bc1, type: 2}
   m_CullingMode: 0

+ 33 - 8
ActionTowerDefense/Assets/Resources/Prefab/Enemy/Enemy_11002.prefab

@@ -124,7 +124,7 @@ GameObject:
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 1
+  m_IsActive: 0
 --- !u!4 &8550728524802026199
 Transform:
   m_ObjectHideFlags: 0
@@ -165,6 +165,8 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: 5eaed0a6b9d6fc6409bef80cf41a0a8e, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
+  isShoot: 0
+  type: 0
   owner: {fileID: 0}
   isSingleAttack: 0
   trigedObjs: []
@@ -226,7 +228,27 @@ MonoBehaviour:
   mecanim: {fileID: 5617185463097218335}
   meshRenderer: {fileID: 0}
   ani: {fileID: 6496896669866891404}
-  aniCollider: {fileID: 2250177594949393219}
+  totalDieKeepTime: 1
+  totalAttack_summonTime: 1.8333
+  totalAttack_marchTime: 1.8333
+  attackKeys:
+  - aniName: attack_march
+    keys:
+    - attackType: 0
+      startKeyName: attack_fire_on
+      startKeyTime: 1
+      endType: 1
+      endKeyName: attack_fire_off
+      endKeyTime: 1.6333
+  - aniName: attack_summon
+    keys:
+    - attackType: 0
+      startKeyName: attack_fire_on
+      startKeyTime: 1
+      endType: 1
+      endKeyName: attack_fire_off
+      endKeyTime: 1.6333
+  dieKeepTime: 0
   rb: {fileID: 2437299196472462355}
   bodyTrans: {fileID: 5075820377452290163}
   beSearchTrigger: {fileID: 6542925321707027015}
@@ -249,13 +271,8 @@ MonoBehaviour:
   armor: 0
   ls: {fileID: 0}
   isInSoulTower: 0
-  totalDieKeepTime: 0
-  dieKeepTime: 0
   canHitFly: 1
   isNonAttack: 0
-  attackTime: 0
-  totalAttack_summonTime: 2
-  totalAttack_marchTime: 2
   attackType: 0
   bulletPrefab: {fileID: 0}
   shootPos: []
@@ -278,6 +295,13 @@ MonoBehaviour:
   armorPiercing: 0
   curDamage1: 
   curDamage2: 
+  attackTime: 0
+  attackKeyCount: 0
+  nextStartKeyTime: 0
+  nextEndKeyTime: 0
+  keyTimes: []
+  curKeyNum: 0
+  isAttackTriggerOn: 0
   targetTypes: 010000000300000002000000
   targetCharacter: {fileID: 0}
   attackTarget: {fileID: 0}
@@ -825,7 +849,7 @@ Animator:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 6382412198167824060}
-  m_Enabled: 1
+  m_Enabled: 0
   m_Avatar: {fileID: 0}
   m_Controller: {fileID: 9100000, guid: 386ae4a82c0e57d42bb18d4b04fb6bc1, type: 2}
   m_CullingMode: 0
@@ -1100,6 +1124,7 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: 376b76302b3c26b49b3431c17bfeee6f, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
+  isEnemy: 1
 --- !u!1 &7970625495845499240
 GameObject:
   m_ObjectHideFlags: 0

+ 16 - 8
ActionTowerDefense/Assets/Resources/Prefab/Enemy/Enemy_11004.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
@@ -91,6 +91,8 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: 5eaed0a6b9d6fc6409bef80cf41a0a8e, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
+  isShoot: 0
+  type: 0
   owner: {fileID: 0}
   isSingleAttack: 0
   trigedObjs: []
@@ -310,7 +312,7 @@ Animator:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 5041915139224979942}
-  m_Enabled: 1
+  m_Enabled: 0
   m_Avatar: {fileID: 0}
   m_Controller: {fileID: 9100000, guid: 6c78d08ce26324f46805da13fb45a72d, type: 2}
   m_CullingMode: 0
@@ -437,7 +439,11 @@ MonoBehaviour:
   mecanim: {fileID: 7573527827155227431}
   meshRenderer: {fileID: 0}
   ani: {fileID: 3333436509305836838}
-  aniCollider: {fileID: 2776251058442384869}
+  totalDieKeepTime: 0
+  totalAttack_summonTime: 0.5
+  totalAttack_marchTime: 0.5
+  attackKeys: []
+  dieKeepTime: 0
   rb: {fileID: 5440846222648032765}
   bodyTrans: {fileID: 6459001683917408033}
   beSearchTrigger: {fileID: 4259433079752244006}
@@ -460,13 +466,8 @@ MonoBehaviour:
   armor: 50
   ls: {fileID: 0}
   isInSoulTower: 0
-  totalDieKeepTime: 0
-  dieKeepTime: 0
   canHitFly: 1
   isNonAttack: 0
-  attackTime: 0
-  totalAttack_summonTime: 0.5
-  totalAttack_marchTime: 0.5
   attackType: 0
   bulletPrefab: {fileID: 0}
   shootPos: []
@@ -489,6 +490,13 @@ MonoBehaviour:
   armorPiercing: 0
   curDamage1: 
   curDamage2: 
+  attackTime: 0
+  attackKeyCount: 0
+  nextStartKeyTime: 0
+  nextEndKeyTime: 0
+  keyTimes: []
+  curKeyNum: 0
+  isAttackTriggerOn: 0
   targetTypes: 010000000200000003000000
   targetCharacter: {fileID: 0}
   attackTarget: {fileID: 0}

+ 91 - 14
ActionTowerDefense/Assets/Resources/Prefab/Enemy/Enemy_11005.prefab

@@ -29,8 +29,78 @@ Transform:
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 6561999689701501378}
-  m_RootOrder: 4
+  m_RootOrder: 5
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!1 &707953348306165426
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 6717727916061356508}
+  - component: {fileID: 464611231020408001}
+  - component: {fileID: 8924180071245218248}
+  m_Layer: 20
+  m_Name: AttackTrigger
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 0
+--- !u!4 &6717727916061356508
+Transform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 707953348306165426}
+  m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+  m_LocalPosition: {x: 0, y: 0, z: 0}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_ConstrainProportionsScale: 0
+  m_Children: []
+  m_Father: {fileID: 6561999689701501378}
+  m_RootOrder: 0
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!65 &464611231020408001
+BoxCollider:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 707953348306165426}
+  m_Material: {fileID: 0}
+  m_IsTrigger: 1
+  m_Enabled: 1
+  serializedVersion: 2
+  m_Size: {x: 2.8041406, y: 1.6068753, z: 2}
+  m_Center: {x: -1.4829297, y: 0.81343764, z: 0}
+--- !u!114 &8924180071245218248
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 707953348306165426}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 5eaed0a6b9d6fc6409bef80cf41a0a8e, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  isShoot: 1
+  type: 0
+  owner: {fileID: 0}
+  isSingleAttack: 0
+  trigedObjs: []
+  damage: 0
+  force: {x: 0, y: 0, z: 0}
+  changeHurt: 0
+  repelValue: 0
+  offsetY: 1
+  hitRate: 1
+  onlyFlyCanWeak: 0
 --- !u!1 &1190225091429982147
 GameObject:
   m_ObjectHideFlags: 0
@@ -62,7 +132,7 @@ Transform:
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 6561999689701501378}
-  m_RootOrder: 3
+  m_RootOrder: 4
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!65 &8507032990732667563
 BoxCollider:
@@ -376,7 +446,7 @@ Transform:
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 6561999689701501378}
-  m_RootOrder: 5
+  m_RootOrder: 6
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!1 &2616922587087395095
 GameObject:
@@ -408,7 +478,7 @@ Transform:
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 6561999689701501378}
-  m_RootOrder: 2
+  m_RootOrder: 3
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!65 &7144185533164728569
 BoxCollider:
@@ -631,7 +701,7 @@ Transform:
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 6561999689701501378}
-  m_RootOrder: 1
+  m_RootOrder: 2
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!65 &6832657651774999176
 BoxCollider:
@@ -689,6 +759,7 @@ Transform:
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
   m_Children:
+  - {fileID: 6717727916061356508}
   - {fileID: 8639832132450015556}
   - {fileID: 5101632837952520453}
   - {fileID: 3215317859961215224}
@@ -707,7 +778,7 @@ Animator:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 6911591061214860228}
-  m_Enabled: 1
+  m_Enabled: 0
   m_Avatar: {fileID: 0}
   m_Controller: {fileID: 9100000, guid: 88f41572d39c5b44e972f9bb92fb3e5e, type: 2}
   m_CullingMode: 0
@@ -864,7 +935,7 @@ Transform:
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 6561999689701501378}
-  m_RootOrder: 6
+  m_RootOrder: 7
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!1 &8639832132450015563
 GameObject:
@@ -897,7 +968,7 @@ Transform:
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 6561999689701501378}
-  m_RootOrder: 0
+  m_RootOrder: 1
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!65 &8639832132450015557
 BoxCollider:
@@ -981,7 +1052,11 @@ MonoBehaviour:
   mecanim: {fileID: 3354085511906294621}
   meshRenderer: {fileID: 0}
   ani: {fileID: 5978259926173120695}
-  aniCollider: {fileID: 6864986857343475389}
+  totalDieKeepTime: 0
+  totalAttack_summonTime: 0.5
+  totalAttack_marchTime: 0.5
+  attackKeys: []
+  dieKeepTime: 0
   rb: {fileID: 8639832132491289349}
   bodyTrans: {fileID: 5769591908339262981}
   beSearchTrigger: {fileID: 316813748882225178}
@@ -1004,13 +1079,8 @@ MonoBehaviour:
   armor: 0
   ls: {fileID: 0}
   isInSoulTower: 0
-  totalDieKeepTime: 0
-  dieKeepTime: 0
   canHitFly: 1
   isNonAttack: 0
-  attackTime: 0
-  totalAttack_summonTime: 0.5
-  totalAttack_marchTime: 0.5
   attackType: 1
   bulletPrefab: {fileID: 7473170563405908938, guid: 0460e8750cef0df4292f6d2bb56a4843, type: 3}
   shootPos:
@@ -1035,6 +1105,13 @@ MonoBehaviour:
   armorPiercing: 0
   curDamage1: 
   curDamage2: 
+  attackTime: 0
+  attackKeyCount: 0
+  nextStartKeyTime: 0
+  nextEndKeyTime: 0
+  keyTimes: []
+  curKeyNum: 0
+  isAttackTriggerOn: 0
   targetTypes: 010000000300000002000000
   targetCharacter: {fileID: 0}
   attackTarget: {fileID: 0}

+ 16 - 8
ActionTowerDefense/Assets/Resources/Prefab/Enemy/Enemy_11008.prefab

@@ -124,7 +124,7 @@ GameObject:
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 1
+  m_IsActive: 0
 --- !u!4 &8550728524802026199
 Transform:
   m_ObjectHideFlags: 0
@@ -165,6 +165,8 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: 5eaed0a6b9d6fc6409bef80cf41a0a8e, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
+  isShoot: 0
+  type: 0
   owner: {fileID: 0}
   isSingleAttack: 0
   trigedObjs: []
@@ -226,7 +228,11 @@ MonoBehaviour:
   mecanim: {fileID: 5617185463097218335}
   meshRenderer: {fileID: 0}
   ani: {fileID: 6496896669866891404}
-  aniCollider: {fileID: 2250177594949393219}
+  totalDieKeepTime: 0
+  totalAttack_summonTime: 0.5
+  totalAttack_marchTime: 0.5
+  attackKeys: []
+  dieKeepTime: 0
   rb: {fileID: 2437299196472462355}
   bodyTrans: {fileID: 5075820377452290163}
   beSearchTrigger: {fileID: 6542925321707027015}
@@ -249,13 +255,8 @@ MonoBehaviour:
   armor: 0
   ls: {fileID: 0}
   isInSoulTower: 0
-  totalDieKeepTime: 0
-  dieKeepTime: 0
   canHitFly: 1
   isNonAttack: 0
-  attackTime: 0
-  totalAttack_summonTime: 0.5
-  totalAttack_marchTime: 0.5
   attackType: 0
   bulletPrefab: {fileID: 0}
   shootPos: []
@@ -278,6 +279,13 @@ MonoBehaviour:
   armorPiercing: 0
   curDamage1: 
   curDamage2: 
+  attackTime: 0
+  attackKeyCount: 0
+  nextStartKeyTime: 0
+  nextEndKeyTime: 0
+  keyTimes: []
+  curKeyNum: 0
+  isAttackTriggerOn: 0
   targetTypes: 010000000300000002000000
   targetCharacter: {fileID: 0}
   attackTarget: {fileID: 0}
@@ -825,7 +833,7 @@ Animator:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 6382412198167824060}
-  m_Enabled: 1
+  m_Enabled: 0
   m_Avatar: {fileID: 0}
   m_Controller: {fileID: 9100000, guid: 386ae4a82c0e57d42bb18d4b04fb6bc1, type: 2}
   m_CullingMode: 0

+ 91 - 14
ActionTowerDefense/Assets/Resources/Prefab/Enemy/Enemy_Arrow.prefab

@@ -29,7 +29,7 @@ Transform:
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 6561999689701501378}
-  m_RootOrder: 4
+  m_RootOrder: 5
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!1 &1190225091429982147
 GameObject:
@@ -62,7 +62,7 @@ Transform:
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 6561999689701501378}
-  m_RootOrder: 3
+  m_RootOrder: 4
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!65 &8507032990732667563
 BoxCollider:
@@ -376,7 +376,7 @@ Transform:
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 6561999689701501378}
-  m_RootOrder: 5
+  m_RootOrder: 6
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!1 &2616922587087395095
 GameObject:
@@ -408,7 +408,7 @@ Transform:
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 6561999689701501378}
-  m_RootOrder: 2
+  m_RootOrder: 3
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!65 &7144185533164728569
 BoxCollider:
@@ -532,6 +532,76 @@ Transform:
   m_Father: {fileID: 8639832132491289354}
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!1 &4809598739698800916
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 4568988268065013165}
+  - component: {fileID: 8606729707248511378}
+  - component: {fileID: 268188960417748479}
+  m_Layer: 20
+  m_Name: AttackTrigger
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 0
+--- !u!4 &4568988268065013165
+Transform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 4809598739698800916}
+  m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+  m_LocalPosition: {x: 0, y: 0, z: 0}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_ConstrainProportionsScale: 0
+  m_Children: []
+  m_Father: {fileID: 6561999689701501378}
+  m_RootOrder: 0
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!65 &8606729707248511378
+BoxCollider:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 4809598739698800916}
+  m_Material: {fileID: 0}
+  m_IsTrigger: 1
+  m_Enabled: 1
+  serializedVersion: 2
+  m_Size: {x: 2.8041406, y: 1.6068753, z: 2}
+  m_Center: {x: -1.4829297, y: 0.81343764, z: 0}
+--- !u!114 &268188960417748479
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 4809598739698800916}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 5eaed0a6b9d6fc6409bef80cf41a0a8e, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  isShoot: 1
+  type: 0
+  owner: {fileID: 0}
+  isSingleAttack: 0
+  trigedObjs: []
+  damage: 0
+  force: {x: 0, y: 0, z: 0}
+  changeHurt: 0
+  repelValue: 0
+  offsetY: 1
+  hitRate: 1
+  onlyFlyCanWeak: 0
 --- !u!1 &5307676761346103599
 GameObject:
   m_ObjectHideFlags: 0
@@ -631,7 +701,7 @@ Transform:
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 6561999689701501378}
-  m_RootOrder: 1
+  m_RootOrder: 2
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!65 &6832657651774999176
 BoxCollider:
@@ -689,6 +759,7 @@ Transform:
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
   m_Children:
+  - {fileID: 4568988268065013165}
   - {fileID: 8639832132450015556}
   - {fileID: 5101632837952520453}
   - {fileID: 3215317859961215224}
@@ -707,7 +778,7 @@ Animator:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 6911591061214860228}
-  m_Enabled: 1
+  m_Enabled: 0
   m_Avatar: {fileID: 0}
   m_Controller: {fileID: 9100000, guid: 88f41572d39c5b44e972f9bb92fb3e5e, type: 2}
   m_CullingMode: 0
@@ -864,7 +935,7 @@ Transform:
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 6561999689701501378}
-  m_RootOrder: 6
+  m_RootOrder: 7
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!1 &8639832132450015563
 GameObject:
@@ -897,7 +968,7 @@ Transform:
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 6561999689701501378}
-  m_RootOrder: 0
+  m_RootOrder: 1
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!65 &8639832132450015557
 BoxCollider:
@@ -981,7 +1052,11 @@ MonoBehaviour:
   mecanim: {fileID: 3354085511906294621}
   meshRenderer: {fileID: 0}
   ani: {fileID: 5978259926173120695}
-  aniCollider: {fileID: 6864986857343475389}
+  totalDieKeepTime: 0
+  totalAttack_summonTime: 0.5
+  totalAttack_marchTime: 0.5
+  attackKeys: []
+  dieKeepTime: 0
   rb: {fileID: 8639832132491289349}
   bodyTrans: {fileID: 5769591908339262981}
   beSearchTrigger: {fileID: 316813748882225178}
@@ -1004,13 +1079,8 @@ MonoBehaviour:
   armor: 0
   ls: {fileID: 0}
   isInSoulTower: 0
-  totalDieKeepTime: 0
-  dieKeepTime: 0
   canHitFly: 1
   isNonAttack: 0
-  attackTime: 0
-  totalAttack_summonTime: 0.5
-  totalAttack_marchTime: 0.5
   attackType: 1
   bulletPrefab: {fileID: 7473170563405908938, guid: 0460e8750cef0df4292f6d2bb56a4843, type: 3}
   shootPos:
@@ -1035,6 +1105,13 @@ MonoBehaviour:
   armorPiercing: 0
   curDamage1: 
   curDamage2: 
+  attackTime: 0
+  attackKeyCount: 0
+  nextStartKeyTime: 0
+  nextEndKeyTime: 0
+  keyTimes: []
+  curKeyNum: 0
+  isAttackTriggerOn: 0
   targetTypes: 010000000300000002000000
   targetCharacter: {fileID: 0}
   attackTarget: {fileID: 0}

+ 15 - 7
ActionTowerDefense/Assets/Resources/Prefab/Enemy/Enemy_Giant.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
@@ -91,6 +91,8 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: 5eaed0a6b9d6fc6409bef80cf41a0a8e, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
+  isShoot: 0
+  type: 0
   owner: {fileID: 0}
   isSingleAttack: 0
   trigedObjs: []
@@ -437,7 +439,11 @@ MonoBehaviour:
   mecanim: {fileID: 7573527827155227431}
   meshRenderer: {fileID: 0}
   ani: {fileID: 3333436509305836838}
-  aniCollider: {fileID: 2776251058442384869}
+  totalDieKeepTime: 0
+  totalAttack_summonTime: 0.5
+  totalAttack_marchTime: 0.5
+  attackKeys: []
+  dieKeepTime: 0
   rb: {fileID: 5440846222648032765}
   bodyTrans: {fileID: 6459001683917408033}
   beSearchTrigger: {fileID: 4259433079752244006}
@@ -460,13 +466,8 @@ MonoBehaviour:
   armor: 0
   ls: {fileID: 0}
   isInSoulTower: 0
-  totalDieKeepTime: 0
-  dieKeepTime: 0
   canHitFly: 1
   isNonAttack: 0
-  attackTime: 0
-  totalAttack_summonTime: 0.5
-  totalAttack_marchTime: 0.5
   attackType: 0
   bulletPrefab: {fileID: 0}
   shootPos: []
@@ -489,6 +490,13 @@ MonoBehaviour:
   armorPiercing: 0
   curDamage1: 
   curDamage2: 
+  attackTime: 0
+  attackKeyCount: 0
+  nextStartKeyTime: 0
+  nextEndKeyTime: 0
+  keyTimes: []
+  curKeyNum: 0
+  isAttackTriggerOn: 0
   targetTypes: 010000000200000003000000
   targetCharacter: {fileID: 0}
   attackTarget: {fileID: 0}

+ 16 - 8
ActionTowerDefense/Assets/Resources/Prefab/Enemy/Enemy_Sword.prefab

@@ -124,7 +124,7 @@ GameObject:
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 1
+  m_IsActive: 0
 --- !u!4 &8550728524802026199
 Transform:
   m_ObjectHideFlags: 0
@@ -165,6 +165,8 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: 5eaed0a6b9d6fc6409bef80cf41a0a8e, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
+  isShoot: 0
+  type: 0
   owner: {fileID: 0}
   isSingleAttack: 0
   trigedObjs: []
@@ -226,7 +228,11 @@ MonoBehaviour:
   mecanim: {fileID: 5617185463097218335}
   meshRenderer: {fileID: 0}
   ani: {fileID: 6496896669866891404}
-  aniCollider: {fileID: 2250177594949393219}
+  totalDieKeepTime: 0
+  totalAttack_summonTime: 0.5
+  totalAttack_marchTime: 0.5
+  attackKeys: []
+  dieKeepTime: 0
   rb: {fileID: 2437299196472462355}
   bodyTrans: {fileID: 5075820377452290163}
   beSearchTrigger: {fileID: 6542925321707027015}
@@ -249,13 +255,8 @@ MonoBehaviour:
   armor: 0
   ls: {fileID: 0}
   isInSoulTower: 0
-  totalDieKeepTime: 0
-  dieKeepTime: 0
   canHitFly: 1
   isNonAttack: 0
-  attackTime: 0
-  totalAttack_summonTime: 0.5
-  totalAttack_marchTime: 0.5
   attackType: 0
   bulletPrefab: {fileID: 0}
   shootPos: []
@@ -278,6 +279,13 @@ MonoBehaviour:
   armorPiercing: 0
   curDamage1: 
   curDamage2: 
+  attackTime: 0
+  attackKeyCount: 0
+  nextStartKeyTime: 0
+  nextEndKeyTime: 0
+  keyTimes: []
+  curKeyNum: 0
+  isAttackTriggerOn: 0
   targetTypes: 010000000300000002000000
   targetCharacter: {fileID: 0}
   attackTarget: {fileID: 0}
@@ -825,7 +833,7 @@ Animator:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 6382412198167824060}
-  m_Enabled: 1
+  m_Enabled: 0
   m_Avatar: {fileID: 0}
   m_Controller: {fileID: 9100000, guid: 386ae4a82c0e57d42bb18d4b04fb6bc1, type: 2}
   m_CullingMode: 0

+ 0 - 0
ActionTowerDefense/Assets/Resources/Prefab/MySpirit.meta → ActionTowerDefense/Assets/Resources/Prefab/MySoldier.meta


+ 99 - 14
ActionTowerDefense/Assets/Resources/Prefab/Demonic_Arrow.prefab → ActionTowerDefense/Assets/Resources/Prefab/MySoldier/Demonic_Arrow.prefab

@@ -29,7 +29,7 @@ Transform:
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 6561999689701501378}
-  m_RootOrder: 4
+  m_RootOrder: 5
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!1 &1190225091429982147
 GameObject:
@@ -62,7 +62,7 @@ Transform:
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 6561999689701501378}
-  m_RootOrder: 3
+  m_RootOrder: 4
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!65 &8507032990732667563
 BoxCollider:
@@ -376,7 +376,7 @@ Transform:
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 6561999689701501378}
-  m_RootOrder: 5
+  m_RootOrder: 6
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!1 &2616922587087395095
 GameObject:
@@ -408,7 +408,7 @@ Transform:
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 6561999689701501378}
-  m_RootOrder: 2
+  m_RootOrder: 3
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!65 &7144185533164728569
 BoxCollider:
@@ -532,6 +532,76 @@ Transform:
   m_Father: {fileID: 8639832132491289354}
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!1 &3484501149616231689
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 8338995292946277063}
+  - component: {fileID: 1224217291386334376}
+  - component: {fileID: 5755692021491134919}
+  m_Layer: 20
+  m_Name: AttackTrigger
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 0
+--- !u!4 &8338995292946277063
+Transform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 3484501149616231689}
+  m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+  m_LocalPosition: {x: -8.01, y: 0, z: 0}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_ConstrainProportionsScale: 0
+  m_Children: []
+  m_Father: {fileID: 6561999689701501378}
+  m_RootOrder: 0
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!65 &1224217291386334376
+BoxCollider:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 3484501149616231689}
+  m_Material: {fileID: 0}
+  m_IsTrigger: 1
+  m_Enabled: 1
+  serializedVersion: 2
+  m_Size: {x: 2.8041406, y: 1.6068753, z: 2}
+  m_Center: {x: -1.4829297, y: 0.81343764, z: 0}
+--- !u!114 &5755692021491134919
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 3484501149616231689}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 5eaed0a6b9d6fc6409bef80cf41a0a8e, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  isShoot: 1
+  type: 0
+  owner: {fileID: 0}
+  isSingleAttack: 0
+  trigedObjs: []
+  damage: 0
+  force: {x: 0, y: 0, z: 0}
+  changeHurt: 0
+  repelValue: 0
+  offsetY: 1
+  hitRate: 1
+  onlyFlyCanWeak: 0
 --- !u!1 &5307676761346103599
 GameObject:
   m_ObjectHideFlags: 0
@@ -631,7 +701,7 @@ Transform:
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 6561999689701501378}
-  m_RootOrder: 1
+  m_RootOrder: 2
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!65 &6832657651774999176
 BoxCollider:
@@ -689,6 +759,7 @@ Transform:
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
   m_Children:
+  - {fileID: 8338995292946277063}
   - {fileID: 8639832132450015556}
   - {fileID: 5101632837952520453}
   - {fileID: 3215317859961215224}
@@ -707,7 +778,7 @@ Animator:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 6911591061214860228}
-  m_Enabled: 1
+  m_Enabled: 0
   m_Avatar: {fileID: 0}
   m_Controller: {fileID: 9100000, guid: 31c90fe05a2e7644b8b57e5964f0810a, type: 2}
   m_CullingMode: 0
@@ -864,7 +935,7 @@ Transform:
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 6561999689701501378}
-  m_RootOrder: 6
+  m_RootOrder: 7
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!1 &8639832132450015563
 GameObject:
@@ -897,7 +968,7 @@ Transform:
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 6561999689701501378}
-  m_RootOrder: 0
+  m_RootOrder: 1
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!65 &8639832132450015557
 BoxCollider:
@@ -981,7 +1052,19 @@ MonoBehaviour:
   mecanim: {fileID: 3354085511906294621}
   meshRenderer: {fileID: 0}
   ani: {fileID: 5978259926173120695}
-  aniCollider: {fileID: 6864986857343475389}
+  totalDieKeepTime: 0
+  totalAttack_summonTime: 0.6
+  totalAttack_marchTime: 0.5
+  attackKeys:
+  - aniName: 
+    keys:
+    - attackType: 0
+      startKeyName: 
+      startKeyTime: 0
+      endType: 0
+      endKeyName: 
+      endKeyTime: 0
+  dieKeepTime: 0
   rb: {fileID: 8639832132491289349}
   bodyTrans: {fileID: 5769591908339262981}
   beSearchTrigger: {fileID: 316813748882225178}
@@ -1004,13 +1087,8 @@ MonoBehaviour:
   armor: 0
   ls: {fileID: 0}
   isInSoulTower: 0
-  totalDieKeepTime: 0
-  dieKeepTime: 0
   canHitFly: 1
   isNonAttack: 0
-  attackTime: 0
-  totalAttack_summonTime: 0.6
-  totalAttack_marchTime: 0.5
   attackType: 1
   bulletPrefab: {fileID: 7473170563405908938, guid: 0460e8750cef0df4292f6d2bb56a4843, type: 3}
   shootPos:
@@ -1045,6 +1123,13 @@ MonoBehaviour:
   armorPiercing: 0
   curDamage1: 
   curDamage2: 
+  attackTime: 0
+  attackKeyCount: 0
+  nextStartKeyTime: 0
+  nextEndKeyTime: 0
+  keyTimes: []
+  curKeyNum: 0
+  isAttackTriggerOn: 0
   targetTypes: 040000000500000006000000
   targetCharacter: {fileID: 0}
   attackTarget: {fileID: 0}

+ 0 - 0
ActionTowerDefense/Assets/Resources/Prefab/Demonic_Arrow.prefab.meta → ActionTowerDefense/Assets/Resources/Prefab/MySoldier/Demonic_Arrow.prefab.meta


+ 15 - 7
ActionTowerDefense/Assets/Resources/Prefab/Demonic_Giant.prefab → ActionTowerDefense/Assets/Resources/Prefab/MySoldier/Demonic_Giant.prefab

@@ -91,6 +91,8 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: 5eaed0a6b9d6fc6409bef80cf41a0a8e, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
+  isShoot: 0
+  type: 0
   owner: {fileID: 0}
   isSingleAttack: 0
   trigedObjs: []
@@ -311,7 +313,7 @@ Animator:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 5041915139224979942}
-  m_Enabled: 1
+  m_Enabled: 0
   m_Avatar: {fileID: 0}
   m_Controller: {fileID: 9100000, guid: 91bcbbd3db30f4341b227e6407b1960e, type: 2}
   m_CullingMode: 0
@@ -438,7 +440,11 @@ MonoBehaviour:
   mecanim: {fileID: 7573527827155227431}
   meshRenderer: {fileID: 0}
   ani: {fileID: 3333436509305836838}
-  aniCollider: {fileID: 2776251058442384869}
+  totalDieKeepTime: 0
+  totalAttack_summonTime: 0.5
+  totalAttack_marchTime: 0.5
+  attackKeys: []
+  dieKeepTime: 0
   rb: {fileID: 5440846222648032765}
   bodyTrans: {fileID: 6459001683917408033}
   beSearchTrigger: {fileID: 4259433079752244006}
@@ -461,13 +467,8 @@ MonoBehaviour:
   armor: 0
   ls: {fileID: 0}
   isInSoulTower: 0
-  totalDieKeepTime: 0
-  dieKeepTime: 0
   canHitFly: 1
   isNonAttack: 0
-  attackTime: 0
-  totalAttack_summonTime: 0.5
-  totalAttack_marchTime: 0.5
   attackType: 0
   bulletPrefab: {fileID: 0}
   shootPos: []
@@ -490,6 +491,13 @@ MonoBehaviour:
   armorPiercing: 0
   curDamage1: 
   curDamage2: 
+  attackTime: 0
+  attackKeyCount: 0
+  nextStartKeyTime: 0
+  nextEndKeyTime: 0
+  keyTimes: []
+  curKeyNum: 0
+  isAttackTriggerOn: 0
   targetTypes: 040000000500000006000000
   targetCharacter: {fileID: 0}
   attackTarget: {fileID: 0}

+ 0 - 0
ActionTowerDefense/Assets/Resources/Prefab/Demonic_Giant.prefab.meta → ActionTowerDefense/Assets/Resources/Prefab/MySoldier/Demonic_Giant.prefab.meta


+ 15 - 7
ActionTowerDefense/Assets/Resources/Prefab/Demonic_Sword.prefab → ActionTowerDefense/Assets/Resources/Prefab/MySoldier/Demonic_Sword.prefab

@@ -113,7 +113,7 @@ Animator:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 1090663073729466903}
-  m_Enabled: 1
+  m_Enabled: 0
   m_Avatar: {fileID: 0}
   m_Controller: {fileID: 9100000, guid: 47cc6460e203a0b45a51357919ea1988, type: 2}
   m_CullingMode: 0
@@ -176,7 +176,11 @@ MonoBehaviour:
   mecanim: {fileID: 5617185463097218335}
   meshRenderer: {fileID: 0}
   ani: {fileID: 6496896669866891404}
-  aniCollider: {fileID: 7460010523729932468}
+  totalDieKeepTime: 0
+  totalAttack_summonTime: 0.5
+  totalAttack_marchTime: 0.5
+  attackKeys: []
+  dieKeepTime: 0
   rb: {fileID: 2437299196472462355}
   bodyTrans: {fileID: 2730232521377132808}
   beSearchTrigger: {fileID: 1317309795988277421}
@@ -199,13 +203,8 @@ MonoBehaviour:
   armor: 0
   ls: {fileID: 0}
   isInSoulTower: 0
-  totalDieKeepTime: 0
-  dieKeepTime: 0
   canHitFly: 1
   isNonAttack: 0
-  attackTime: 0
-  totalAttack_summonTime: 0.5
-  totalAttack_marchTime: 0.5
   attackType: 0
   bulletPrefab: {fileID: 0}
   shootPos: []
@@ -228,6 +227,13 @@ MonoBehaviour:
   armorPiercing: 0
   curDamage1: 
   curDamage2: 
+  attackTime: 0
+  attackKeyCount: 0
+  nextStartKeyTime: 0
+  nextEndKeyTime: 0
+  keyTimes: []
+  curKeyNum: 0
+  isAttackTriggerOn: 0
   targetTypes: 040000000500000006000000
   targetCharacter: {fileID: 0}
   attackTarget: {fileID: 0}
@@ -671,6 +677,8 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: 5eaed0a6b9d6fc6409bef80cf41a0a8e, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
+  isShoot: 0
+  type: 0
   owner: {fileID: 0}
   isSingleAttack: 0
   trigedObjs: []

+ 0 - 0
ActionTowerDefense/Assets/Resources/Prefab/Demonic_Sword.prefab.meta → ActionTowerDefense/Assets/Resources/Prefab/MySoldier/Demonic_Sword.prefab.meta


+ 15 - 7
ActionTowerDefense/Assets/Resources/Prefab/MySpirit/Spirits_Assassin.prefab → ActionTowerDefense/Assets/Resources/Prefab/MySoldier/Spirits_Assassin.prefab

@@ -114,7 +114,7 @@ Animator:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 1090663073729466903}
-  m_Enabled: 1
+  m_Enabled: 0
   m_Avatar: {fileID: 0}
   m_Controller: {fileID: 9100000, guid: bbac8c2923279db41a359090938525b4, type: 2}
   m_CullingMode: 0
@@ -304,7 +304,11 @@ MonoBehaviour:
   mecanim: {fileID: 5617185463097218335}
   meshRenderer: {fileID: 0}
   ani: {fileID: 6496896669866891404}
-  aniCollider: {fileID: 7460010523729932468}
+  totalDieKeepTime: 2
+  totalAttack_summonTime: 0.5
+  totalAttack_marchTime: 0.5
+  attackKeys: []
+  dieKeepTime: 0
   rb: {fileID: 2437299196472462355}
   bodyTrans: {fileID: 2730232521377132808}
   beSearchTrigger: {fileID: 1317309795988277421}
@@ -327,13 +331,8 @@ MonoBehaviour:
   armor: 0
   ls: {fileID: 0}
   isInSoulTower: 0
-  totalDieKeepTime: 2
-  dieKeepTime: 0
   canHitFly: 0
   isNonAttack: 0
-  attackTime: 0
-  totalAttack_summonTime: 0.5
-  totalAttack_marchTime: 0.5
   attackType: 2
   bulletPrefab: {fileID: 0}
   shootPos: []
@@ -356,6 +355,13 @@ MonoBehaviour:
   armorPiercing: 0
   curDamage1: 
   curDamage2: 
+  attackTime: 0
+  attackKeyCount: 0
+  nextStartKeyTime: 0
+  nextEndKeyTime: 0
+  keyTimes: []
+  curKeyNum: 0
+  isAttackTriggerOn: 0
   targetTypes: 040000000500000006000000
   targetCharacter: {fileID: 0}
   attackTarget: {fileID: 0}
@@ -916,6 +922,8 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: 5eaed0a6b9d6fc6409bef80cf41a0a8e, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
+  isShoot: 0
+  type: 0
   owner: {fileID: 0}
   isSingleAttack: 0
   trigedObjs: []

+ 0 - 0
ActionTowerDefense/Assets/Resources/Prefab/MySpirit/Spirits_Assassin.prefab.meta → ActionTowerDefense/Assets/Resources/Prefab/MySoldier/Spirits_Assassin.prefab.meta


+ 16 - 8
ActionTowerDefense/Assets/Resources/Prefab/MySpirit/Spirits_Cook.prefab → ActionTowerDefense/Assets/Resources/Prefab/MySoldier/Spirits_Cook.prefab

@@ -158,7 +158,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
@@ -199,6 +199,8 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: 5eaed0a6b9d6fc6409bef80cf41a0a8e, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
+  isShoot: 0
+  type: 0
   owner: {fileID: 0}
   isSingleAttack: 0
   trigedObjs: []
@@ -598,7 +600,7 @@ Animator:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 5041915139224979942}
-  m_Enabled: 1
+  m_Enabled: 0
   m_Avatar: {fileID: 0}
   m_Controller: {fileID: 9100000, guid: 8991a641567365b46b1b2449a3788987, type: 2}
   m_CullingMode: 0
@@ -728,7 +730,11 @@ MonoBehaviour:
   mecanim: {fileID: 7573527827155227431}
   meshRenderer: {fileID: 0}
   ani: {fileID: 3333436509305836838}
-  aniCollider: {fileID: 2776251058442384869}
+  totalDieKeepTime: 0
+  totalAttack_summonTime: 0.5
+  totalAttack_marchTime: 0.5
+  attackKeys: []
+  dieKeepTime: 0
   rb: {fileID: 5440846222648032765}
   bodyTrans: {fileID: 6459001683917408033}
   beSearchTrigger: {fileID: 4259433079752244006}
@@ -751,13 +757,8 @@ MonoBehaviour:
   armor: 0
   ls: {fileID: 0}
   isInSoulTower: 0
-  totalDieKeepTime: 0
-  dieKeepTime: 0
   canHitFly: 1
   isNonAttack: 1
-  attackTime: 0
-  totalAttack_summonTime: 0.5
-  totalAttack_marchTime: 0.5
   attackType: 0
   bulletPrefab: {fileID: 0}
   shootPos: []
@@ -780,6 +781,13 @@ MonoBehaviour:
   armorPiercing: 0
   curDamage1: 
   curDamage2: 
+  attackTime: 0
+  attackKeyCount: 0
+  nextStartKeyTime: 0
+  nextEndKeyTime: 0
+  keyTimes: []
+  curKeyNum: 0
+  isAttackTriggerOn: 0
   targetTypes: 010000000300000004000000
   targetCharacter: {fileID: 0}
   attackTarget: {fileID: 0}

+ 0 - 0
ActionTowerDefense/Assets/Resources/Prefab/MySpirit/Spirits_Cook.prefab.meta → ActionTowerDefense/Assets/Resources/Prefab/MySoldier/Spirits_Cook.prefab.meta


+ 91 - 14
ActionTowerDefense/Assets/Resources/Prefab/MySpirit/Spirits_Float.prefab → ActionTowerDefense/Assets/Resources/Prefab/MySoldier/Spirits_Float.prefab

@@ -29,7 +29,7 @@ Transform:
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 6561999689701501378}
-  m_RootOrder: 4
+  m_RootOrder: 5
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!1 &1190225091429982147
 GameObject:
@@ -62,7 +62,7 @@ Transform:
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 6561999689701501378}
-  m_RootOrder: 3
+  m_RootOrder: 4
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!65 &8507032990732667563
 BoxCollider:
@@ -378,7 +378,7 @@ Transform:
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 6561999689701501378}
-  m_RootOrder: 5
+  m_RootOrder: 6
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!1 &2616922587087395095
 GameObject:
@@ -410,7 +410,7 @@ Transform:
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 6561999689701501378}
-  m_RootOrder: 2
+  m_RootOrder: 3
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!65 &7144185533164728569
 BoxCollider:
@@ -633,7 +633,7 @@ Transform:
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 6561999689701501378}
-  m_RootOrder: 1
+  m_RootOrder: 2
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!65 &6832657651774999176
 BoxCollider:
@@ -691,6 +691,7 @@ Transform:
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
   m_Children:
+  - {fileID: 7045697418869821552}
   - {fileID: 8639832132450015556}
   - {fileID: 5101632837952520453}
   - {fileID: 3215317859961215224}
@@ -709,7 +710,7 @@ Animator:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 6911591061214860228}
-  m_Enabled: 1
+  m_Enabled: 0
   m_Avatar: {fileID: 0}
   m_Controller: {fileID: 9100000, guid: 629ccc9002c46f04f95ee575f4573310, type: 2}
   m_CullingMode: 0
@@ -736,6 +737,76 @@ MonoBehaviour:
   owner: {fileID: 0}
   smoke: {fileID: 0}
   hitRate: 1
+--- !u!1 &7279936714574197028
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 7045697418869821552}
+  - component: {fileID: 6881242962002891033}
+  - component: {fileID: 2344504702192423467}
+  m_Layer: 20
+  m_Name: AttackTrigger
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 0
+--- !u!4 &7045697418869821552
+Transform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 7279936714574197028}
+  m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+  m_LocalPosition: {x: -8.01, y: 0, z: 0}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_ConstrainProportionsScale: 0
+  m_Children: []
+  m_Father: {fileID: 6561999689701501378}
+  m_RootOrder: 0
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!65 &6881242962002891033
+BoxCollider:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 7279936714574197028}
+  m_Material: {fileID: 0}
+  m_IsTrigger: 1
+  m_Enabled: 1
+  serializedVersion: 2
+  m_Size: {x: 2.8041406, y: 1.6068753, z: 2}
+  m_Center: {x: -1.4829297, y: 0.81343764, z: 0}
+--- !u!114 &2344504702192423467
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 7279936714574197028}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 5eaed0a6b9d6fc6409bef80cf41a0a8e, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  isShoot: 1
+  type: 0
+  owner: {fileID: 0}
+  isSingleAttack: 0
+  trigedObjs: []
+  damage: 0
+  force: {x: 0, y: 0, z: 0}
+  changeHurt: 0
+  repelValue: 0
+  offsetY: 1
+  hitRate: 1
+  onlyFlyCanWeak: 0
 --- !u!1 &7414577738945366659
 GameObject:
   m_ObjectHideFlags: 0
@@ -866,7 +937,7 @@ Transform:
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 6561999689701501378}
-  m_RootOrder: 6
+  m_RootOrder: 7
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!1 &8639832132450015563
 GameObject:
@@ -899,7 +970,7 @@ Transform:
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 6561999689701501378}
-  m_RootOrder: 0
+  m_RootOrder: 1
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!65 &8639832132450015557
 BoxCollider:
@@ -999,7 +1070,11 @@ MonoBehaviour:
   mecanim: {fileID: 3354085511906294621}
   meshRenderer: {fileID: 0}
   ani: {fileID: 5978259926173120695}
-  aniCollider: {fileID: 6864986857343475389}
+  totalDieKeepTime: 2
+  totalAttack_summonTime: 0.5
+  totalAttack_marchTime: 0.5
+  attackKeys: []
+  dieKeepTime: 0
   rb: {fileID: 8639832132491289349}
   bodyTrans: {fileID: 5769591908339262981}
   beSearchTrigger: {fileID: 316813748882225178}
@@ -1022,13 +1097,8 @@ MonoBehaviour:
   armor: 0
   ls: {fileID: 0}
   isInSoulTower: 0
-  totalDieKeepTime: 2
-  dieKeepTime: 0
   canHitFly: 1
   isNonAttack: 0
-  attackTime: 0
-  totalAttack_summonTime: 0.5
-  totalAttack_marchTime: 0.5
   attackType: 1
   bulletPrefab: {fileID: 7473170563405908938, guid: 5a7a8caaf3e79ec4f814d34467f0bf46, type: 3}
   shootPos:
@@ -1053,6 +1123,13 @@ MonoBehaviour:
   armorPiercing: 0
   curDamage1: 
   curDamage2: 
+  attackTime: 0
+  attackKeyCount: 0
+  nextStartKeyTime: 0
+  nextEndKeyTime: 0
+  keyTimes: []
+  curKeyNum: 0
+  isAttackTriggerOn: 0
   targetTypes: 040000000500000006000000
   targetCharacter: {fileID: 0}
   attackTarget: {fileID: 0}

+ 0 - 0
ActionTowerDefense/Assets/Resources/Prefab/MySpirit/Spirits_Float.prefab.meta → ActionTowerDefense/Assets/Resources/Prefab/MySoldier/Spirits_Float.prefab.meta


+ 13 - 7
ActionTowerDefense/Assets/Resources/Prefab/MySpirit/Spirits_Invisible.prefab → ActionTowerDefense/Assets/Resources/Prefab/MySoldier/Spirits_Invisible.prefab

@@ -112,7 +112,7 @@ Animator:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 1090663073729466903}
-  m_Enabled: 1
+  m_Enabled: 0
   m_Avatar: {fileID: 0}
   m_Controller: {fileID: 0}
   m_CullingMode: 0
@@ -216,7 +216,11 @@ MonoBehaviour:
   mecanim: {fileID: 5617185463097218335}
   meshRenderer: {fileID: 0}
   ani: {fileID: 6496896669866891404}
-  aniCollider: {fileID: 7460010523729932468}
+  totalDieKeepTime: 2
+  totalAttack_summonTime: 0.5
+  totalAttack_marchTime: 0.5
+  attackKeys: []
+  dieKeepTime: 0
   rb: {fileID: 2472120008162019348}
   bodyTrans: {fileID: 2730232521377132808}
   beSearchTrigger: {fileID: 1317309795988277421}
@@ -239,13 +243,8 @@ MonoBehaviour:
   armor: 0
   ls: {fileID: 0}
   isInSoulTower: 0
-  totalDieKeepTime: 2
-  dieKeepTime: 0
   canHitFly: 0
   isNonAttack: 0
-  attackTime: 0
-  totalAttack_summonTime: 0.5
-  totalAttack_marchTime: 0.5
   attackType: 2
   bulletPrefab: {fileID: 0}
   shootPos: []
@@ -268,6 +267,13 @@ MonoBehaviour:
   armorPiercing: 0
   curDamage1: 
   curDamage2: 
+  attackTime: 0
+  attackKeyCount: 0
+  nextStartKeyTime: 0
+  nextEndKeyTime: 0
+  keyTimes: []
+  curKeyNum: 0
+  isAttackTriggerOn: 0
   targetTypes: 040000000500000006000000
   targetCharacter: {fileID: 0}
   attackTarget: {fileID: 0}

+ 0 - 0
ActionTowerDefense/Assets/Resources/Prefab/MySpirit/Spirits_Invisible.prefab.meta → ActionTowerDefense/Assets/Resources/Prefab/MySoldier/Spirits_Invisible.prefab.meta


+ 30 - 9
ActionTowerDefense/Assets/Scenes/Game.unity

@@ -867,7 +867,11 @@ MonoBehaviour:
   mecanim: {fileID: 0}
   meshRenderer: {fileID: 0}
   ani: {fileID: 0}
-  aniCollider: {fileID: 0}
+  totalDieKeepTime: 2
+  totalAttack_summonTime: 0.5
+  totalAttack_marchTime: 0.5
+  attackKeys: []
+  dieKeepTime: 0
   rb: {fileID: 317380085}
   bodyTrans: {fileID: 0}
   beSearchTrigger: {fileID: 0}
@@ -887,25 +891,29 @@ MonoBehaviour:
   injuryNumText: {fileID: 0}
   showInjuryNum: 0
   canFly: 0
+  armor: 0
   ls: {fileID: 0}
   isInSoulTower: 0
-  totalDieKeepTime: 2
-  dieKeepTime: 0
   canHitFly: 0
   isNonAttack: 0
-  attackTime: 0
-  totalAttack1Time: 0.5
-  totalAttack2Time: 0.5
   attackType: 0
   bulletPrefab: {fileID: 0}
   shootPos: []
   shootTrack: 0
-  attack1Infos: []
-  attack2Infos: []
+  Attack_summonInfos: []
+  Attack_marchInfos: []
   attackTriggers: []
   addAttackEffect: {fileID: 0}
+  armorPiercing: 0
   curDamage1: 
   curDamage2: 
+  attackTime: 0
+  attackKeyCount: 0
+  nextStartKeyTime: 0
+  nextEndKeyTime: 0
+  keyTimes: []
+  curKeyNum: 0
+  isAttackTriggerOn: 0
   targetTypes: 
   targetCharacter: {fileID: 0}
   attackTarget: {fileID: 0}
@@ -920,7 +928,7 @@ MonoBehaviour:
   beLarger: 0
   toLargeSize: 0
   cookEffect: {fileID: 0}
-  attack1ShootCanTransmit: 0
+  Attack_summonShootCanTransmit: 0
   debugAttackFrom: 0
   ropes: {fileID: 0}
   ropePrefab: {fileID: 616841038056457886, guid: db20d049c85578a4db3cef14a52b0f7b, type: 3}
@@ -19712,6 +19720,7 @@ GameObject:
   - component: {fileID: 1714821085}
   - component: {fileID: 1714821087}
   - component: {fileID: 1714821088}
+  - component: {fileID: 1714821089}
   m_Layer: 0
   m_Name: GameManager
   m_TagString: Untagged
@@ -19787,6 +19796,18 @@ MonoBehaviour:
   - levelName: Level_Normal_A_000_001
   - levelName: Level_Normal_A_000_002
   - levelName: "Level_Normal_A_000_003\u5B88\u5854"
+--- !u!114 &1714821089
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1714821084}
+  m_Enabled: 0
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: c5c695aaa2214534c9ed516d10d6a3d0, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
 --- !u!1 &1729202001
 GameObject:
   m_ObjectHideFlags: 0

+ 65 - 39
ActionTowerDefense/Assets/Scripts/AttackTrigger.cs

@@ -5,6 +5,16 @@ using UnityEngine;
 
 public class AttackTrigger : MonoBehaviour
 {
+    public enum attackTpye
+    {
+        summon = 0,
+        march = 1,
+    }
+
+    [Header("是否是远程角色")]
+    public bool isShoot;
+    public attackTpye type;
+
     public Character owner;
     [Header("是否为单体攻击")]
     public bool isSingleAttack;
@@ -24,8 +34,8 @@ public class AttackTrigger : MonoBehaviour
     private void Awake()
     {
         owner = GetComponentInParent<Character>();
-        
     }
+
     private void OnTriggerEnter(Collider other)
     {
         if (isInVain)
@@ -64,54 +74,70 @@ public class AttackTrigger : MonoBehaviour
     }
     private void OnDisable()
     {
-        int attackTimeLimit = 1;
-        if (isInVain)
+        if (isShoot)
         {
-            isInVain = false;
+            CharacterColliders cc = GetComponentInParent<CharacterColliders>();
+            switch (type)
+            {
+                case attackTpye.summon:
+                    cc.Attack_summonShootEvent(0);
+                    break;
+                case attackTpye.march:
+                    cc.Attack_marchShootEvent(0);
+                    break;
+            }
         }
         else
         {
-            for (int i = 0; i < trigedObjs.Count; i++)
+            int attackTimeLimit = 1;
+            if (isInVain)
+            {
+                isInVain = false;
+            }
+            else
             {
-                if (trigedObjs[i] && Util.CheckCanHit(owner.tag, trigedObjs[i].owner.tag) && !trigedObjs[i].owner.isDie)
+                for (int i = 0; i < trigedObjs.Count; i++)
                 {
-                    if (isSingleAttack && attackTimeLimit == 0)
-                    {
-                        break;
-                    }
-                    if (onlyFlyCanWeak && !trigedObjs[i].owner.canFly)
+                    if (trigedObjs[i] && Util.CheckCanHit(owner.tag, trigedObjs[i].owner.tag) && !trigedObjs[i].owner.isDie)
                     {
-                        MoveCharacter moveCharacter = trigedObjs[i].owner.GetComponent<MoveCharacter>();
-                        if (moveCharacter)
+                        if (isSingleAttack && attackTimeLimit == 0)
                         {
-                            moveCharacter.newTotalWeakTime = 0;
-                        }                        
-                    }
-                    //计算护甲减免
-                    int curDamage = damage;
-                    int am = trigedObjs[i].owner.armor;
-                    if (am > 0)
-                    {
-                        int ap = owner.armorPiercing;
-                        int c = am - ap;
-                        if (c < 0)
+                            break;
+                        }
+                        if (onlyFlyCanWeak && !trigedObjs[i].owner.canFly)
                         {
-                            c = 0;
+                            MoveCharacter moveCharacter = trigedObjs[i].owner.GetComponent<MoveCharacter>();
+                            if (moveCharacter)
+                            {
+                                moveCharacter.newTotalWeakTime = 0;
+                            }
+                        }
+                        //计算护甲减免
+                        int curDamage = damage;
+                        int am = trigedObjs[i].owner.armor;
+                        if (am > 0)
+                        {
+                            int ap = owner.armorPiercing;
+                            int c = am - ap;
+                            if (c < 0)
+                            {
+                                c = 0;
+                            }
+                            curDamage = (int)(curDamage * (100f / (100 + c)) + 0.5f);
+                        }
+                        trigedObjs[i].BeHit(curDamage, force, changeHurt, repelValue);
+                        if (trigedObjs[i].owner.debugAttackFrom)
+                        {
+                            trigedObjs[i].owner.DebugAttackFrom(owner.name, curDamage);
+                        }
+                        if (owner.GetComponent<Demonic>())
+                        {
+                            trigedObjs[i].attackerID = owner.GetComponent<Demonic>().id;
+                        }
+                        if (isSingleAttack)
+                        {
+                            attackTimeLimit--;
                         }
-                        curDamage = (int)(curDamage * (100f / (100 + c)) + 0.5f);
-                    }
-                    trigedObjs[i].BeHit(curDamage, force, changeHurt, repelValue);
-                    if (trigedObjs[i].owner.debugAttackFrom)
-                    {
-                        trigedObjs[i].owner.DebugAttackFrom(owner.name, curDamage);
-                    }
-                    if (owner.GetComponent<Demonic>())
-                    {
-                        trigedObjs[i].attackerID = owner.GetComponent<Demonic>().id;
-                    }
-                    if (isSingleAttack)
-                    {
-                        attackTimeLimit--;
                     }
                 }
             }

+ 66 - 7
ActionTowerDefense/Assets/Scripts/Character.cs

@@ -69,12 +69,12 @@ public enum KeyType
 [System.Serializable]
 public struct AttackKeyType
 {
+    public KeyType attackType;
     public string startKeyName;
     public float startKeyTime;
-    public KeyType attackType;
+    public KeyType endType;
     public string endKeyName;
     public float endKeyTime;
-    public KeyType endType;
 }
 
 public class Character : MonoBehaviour
@@ -87,9 +87,8 @@ public class Character : MonoBehaviour
 
     [Header("动画控制器")]
     public Animator ani;
-    public Animator aniCollider;
     
-    [Header("所有动画时间")]
+    [Header("重要动画时间")]
     public float totalDieKeepTime = 2f;
     public float totalAttack_summonTime = 0.5f;
     public float totalAttack_marchTime = 0.5f;
@@ -136,7 +135,6 @@ public class Character : MonoBehaviour
     public bool canHitFly;
     [HideInInspector]
     public bool isNonAttack = false;            //无普攻
-    public float attackTime;
     public AttackType attackType;               //攻击类型
     public GameObject bulletPrefab;             //远程攻击的子弹
     public List<Transform> shootPos;            //远程攻击的子弹发射位置
@@ -148,6 +146,12 @@ public class Character : MonoBehaviour
     public int armorPiercing;                   //穿甲率
     public int[] curDamage1;
     public int[] curDamage2;
+    public float attackTime;
+    public float attackKeyCount;                //攻击进行时间
+    public float nextStartKeyTime, nextEndKeyTime;  //下一个出现/消失attacktrigger的时间
+    public List<float> keyTimes;                //所有的帧事件时间
+    public int curKeyNum;                       //当前锁定到第几个帧事件
+    public bool isAttackTriggerOn = false;      //当前Attack Trigger是否开启
 
     [Header("目标")]
     public List<TargetType> targetTypes;
@@ -333,13 +337,46 @@ public class Character : MonoBehaviour
         return moveDir;
     }
 
+    public void SetNextKeyTimes()
+    {
+        if (curKeyNum < keyTimes.Count)
+        {
+            nextStartKeyTime = keyTimes[curKeyNum];
+            nextEndKeyTime = keyTimes[curKeyNum + 1];
+            curKeyNum += 2;
+        }
+    }
+
     public virtual void Attack_summon()
     {
         ani.Play("Attack_summon", 0, 0);
         if (!isNonAttack)
         {
-            aniCollider.Play("Attack_summon", 1, 0);
+            if (attackType == AttackType.Shoot)
+            {
+                foreach(AttackTrigger at in attackTriggers)
+                {
+                    at.isShoot = true;
+                    at.GetComponent<Collider>().enabled = false;
+                    at.type = AttackTrigger.attackTpye.summon;
+                }
+            }
             attackTime = totalAttack_summonTime;
+            attackKeyCount = 0;
+            keyTimes = new List<float>();
+            foreach(SpineAniKey sak in attackKeys)
+            {
+                if (sak.aniName == "attack_summon")
+                {
+                    foreach(AttackKeyType akt in sak.keys)
+                    {
+                        keyTimes.Add(akt.startKeyTime);
+                        keyTimes.Add(akt.endKeyTime);
+                    }
+                }
+            }
+            SetNextKeyTimes();
+
             switch (attackType)
             {
                 case AttackType.Melee:
@@ -386,8 +423,30 @@ public class Character : MonoBehaviour
         }
 
         ani.Play("Attack_march", 0, 0);
-        aniCollider.Play("Attack_march", 1, 0);
+        if (attackType == AttackType.Shoot)
+        {
+            foreach (AttackTrigger at in attackTriggers)
+            {
+                at.isShoot = true;
+                at.GetComponent<Collider>().enabled = false;
+                at.type = AttackTrigger.attackTpye.march;
+            }
+        }
         attackTime = totalAttack_marchTime;
+        attackKeyCount = 0;
+        keyTimes = new List<float>();
+        foreach (SpineAniKey sak in attackKeys)
+        {
+            if (sak.aniName == "attack_march")
+            {
+                foreach (AttackKeyType akt in sak.keys)
+                {
+                    keyTimes.Add(akt.startKeyTime);
+                    keyTimes.Add(akt.endKeyTime);
+                }
+            }
+        }
+        SetNextKeyTimes();
         if (attackTriggers.Count > 0)
         {
             for (int i = 0; i < Attack_marchInfos.Count; i++)

+ 18 - 16
ActionTowerDefense/Assets/Scripts/Demonic.cs

@@ -298,6 +298,7 @@ public class Demonic : MoveCharacter
         base.OnState();
         //hurtKeepTime -= Time.deltaTime;
         attackTime -= Time.deltaTime;
+        attackKeyCount += Time.deltaTime;
         dieKeepTime -= Time.deltaTime;
         invincibleTime -= Time.deltaTime;
         weakTime -= Time.deltaTime;
@@ -508,6 +509,23 @@ public class Demonic : MoveCharacter
                 }
                 break;
             case CharacterState.Attack:
+                if (!isAttackTriggerOn && attackKeyCount >= nextStartKeyTime && attackKeyCount <= nextEndKeyTime)
+                {
+                    isAttackTriggerOn = true;
+                    foreach (AttackTrigger at in attackTriggers)
+                    {
+                        at.gameObject.SetActive(true);
+                    }
+                }
+                else if (isAttackTriggerOn && attackKeyCount >= nextEndKeyTime)
+                {
+                    isAttackTriggerOn = false;
+                    foreach (AttackTrigger at in attackTriggers)
+                    {
+                        at.gameObject.SetActive(false);
+                    }
+                    SetNextKeyTimes();
+                }
                 if (attackTime <= 0)
                 {
                     if (isInSoulTower)
@@ -541,7 +559,6 @@ public class Demonic : MoveCharacter
                     {
                         isBeBlownUp = true;
                         ani.Play("hitted", 0, 0);
-                        aniCollider.Play("Hurt", 0, 0);
                     }
                     Vector3 vel = rb.velocity;
                     if (foot.TrigGround && vel.y <= 0)
@@ -577,7 +594,6 @@ public class Demonic : MoveCharacter
                                 if (ani.GetCurrentAnimatorClipInfo(0)[0].clip.name != "walk")
                                 {
                                     ani.Play("walk", 0, 0);
-                                    aniCollider.Play("Walk", 0, 0);
                                 }
                             }
                         }
@@ -592,7 +608,6 @@ public class Demonic : MoveCharacter
                         if (ani.GetCurrentAnimatorClipInfo(0)[0].clip.name != "weak")
                         {
                             ani.Play("weak", 0, 0);
-                            aniCollider.Play("Weak", 0, 0);
                             rb.velocity = Vector3.zero;
                         }
                     }
@@ -654,7 +669,6 @@ public class Demonic : MoveCharacter
                     else
                     {
                         ani.Play("idle", 0, 0);
-                        aniCollider.Play("Idle", 0, 0);
                         rb.velocity = Vector3.zero;
                         transform.position = origSoulPos;
                         isReturnSoulTower = false;
@@ -734,7 +748,6 @@ public class Demonic : MoveCharacter
                 canMove = true;
                 break;
             case CharacterState.Attack:
-                aniCollider.Play("NotAttack", 1, 0);
                 break;
             case CharacterState.Die:
                 isDie = false;
@@ -763,25 +776,18 @@ public class Demonic : MoveCharacter
         {
             case CharacterState.Idle:
                 ani.Play("idle", 0, 0);
-                aniCollider.Play("Idle", 0, 0);
                 rb.velocity = Vector3.zero;
                 //animalAni.SetInteger("state", (int)PlayerState.Idle);
                 break;
             case CharacterState.Run:
                 ani.Play("walk", 0, 0);
-                aniCollider.Play("Walk", 0, 0);
                 //animalAni.SetInteger("state", (int)PlayerState.Walk);
                 break;
             case CharacterState.Rush:
                 ani.Play("rush", 0, 0);
-                aniCollider.Play("Rush", 0, 0);
-                break;
-            case CharacterState.Rise:
-                aniCollider.Play("Rise", 0, 0);
                 break;
             case CharacterState.Fall:
                 ani.Play("fall", 0, 0);
-                aniCollider.Play("Fall", 0, 0);
                 //animalAni.SetInteger("state", (int)PlayerState.Fall);
                 break;
             //case CharacterState.Hurt:
@@ -794,7 +800,6 @@ public class Demonic : MoveCharacter
             case CharacterState.Coma:
                 //ani.Play("Coma", 0, 0);
                 ani.Play("idle", 0, 0);
-                aniCollider.Play("Idle", 0, 0);
                 pastComaTime = 0;
                 rb.velocity = Vector3.zero;
                 break;
@@ -802,7 +807,6 @@ public class Demonic : MoveCharacter
                 break;
             case CharacterState.Die:
                 ani.Play("die", 0, 0);
-                aniCollider.Play("Die", 0, 0);
                 isDie = true;
                 dieKeepTime = totalDieKeepTime;
                 break;
@@ -823,13 +827,11 @@ public class Demonic : MoveCharacter
             case CharacterState.BaGua:
                 rb.velocity = Vector3.zero;
                 ani.Play("idle", 0, 0);
-                aniCollider.Play("Idle", 0, 0);
                 DropSouls();
                 break;
             case CharacterState.LockSoul:
                 rb.velocity = Vector3.zero;
                 ani.Play("walk", 0, 0);
-                aniCollider.Play("Walk", 0, 0);
                 //FaceToEneTower();
                 break;
             default:

+ 18 - 19
ActionTowerDefense/Assets/Scripts/Enemy.cs

@@ -276,6 +276,7 @@ public class Enemy : MoveCharacter
         base.OnState();
         //hurtKeepTime -= Time.deltaTime;
         attackTime -= Time.deltaTime;
+        attackKeyCount += Time.deltaTime;
         dieKeepTime -= Time.deltaTime;
         invincibleTime -= Time.deltaTime;
         weakTime -= Time.deltaTime;
@@ -472,6 +473,23 @@ public class Enemy : MoveCharacter
                 rb.velocity = velocity;
                 break;
             case CharacterState.Attack:
+                if (!isAttackTriggerOn && attackKeyCount >= nextStartKeyTime && attackKeyCount <= nextEndKeyTime)
+                {
+                    isAttackTriggerOn = true;
+                    foreach (AttackTrigger at in attackTriggers)
+                    {
+                        at.gameObject.SetActive(true);
+                    }
+                }
+                else if (isAttackTriggerOn && attackKeyCount >= nextEndKeyTime)
+                {
+                    isAttackTriggerOn = false;
+                    foreach (AttackTrigger at in attackTriggers)
+                    {
+                        at.gameObject.SetActive(false);
+                    }
+                    SetNextKeyTimes();
+                }
                 if (attackTime <= 0)
                 {
                     ChangeState(CharacterState.Idle);
@@ -492,7 +510,6 @@ public class Enemy : MoveCharacter
                     {
                         isBeBlownUp = true;
                         ani.Play("hitted", 0, 0);
-                        aniCollider.Play("Hurt", 0, 0);
                     }
                     Vector3 vel = rb.velocity;
                     if (foot.TrigGround && vel.y <= 0)
@@ -553,7 +570,6 @@ public class Enemy : MoveCharacter
                                 if (ani.GetCurrentAnimatorClipInfo(0)[0].clip.name != "walk")
                                 {
                                     ani.Play("walk", 0, 0);
-                                    aniCollider.Play("Walk", 0, 0);
                                 }
                             }
                         }
@@ -568,7 +584,6 @@ public class Enemy : MoveCharacter
                         if (ani.GetCurrentAnimatorClipInfo(0)[0].clip.name != "weak")
                         {
                             ani.Play("weak", 0, 0);
-                            aniCollider.Play("Weak", 0, 0);
                             rb.velocity = Vector3.zero;
                         }
                     }
@@ -744,7 +759,6 @@ public class Enemy : MoveCharacter
             //case CharacterState.Hurt:
             //    break;
             case CharacterState.Attack:
-                aniCollider.Play("NotAttack", 1, 0);
                 break;
             case CharacterState.Die:
                 isDie = false;
@@ -766,7 +780,6 @@ public class Enemy : MoveCharacter
                 break;
             case CharacterState.Coma:
                 ani.Play("idle", 0, 0);
-                aniCollider.Play("Idle", 0, 0);
                 if (canFly)
                 {
                     rb.constraints = RigidbodyConstraints.FreezeRotation | RigidbodyConstraints.FreezePositionZ | RigidbodyConstraints.FreezePositionY;
@@ -821,7 +834,6 @@ public class Enemy : MoveCharacter
                 searchState = SearchState.NoTarget;
                 noOnSearchState = false;
                 ani.Play("idle", 0, 0);
-                aniCollider.Play("Idle", 0, 0);
                 break;
             default:
                 break;
@@ -832,24 +844,15 @@ public class Enemy : MoveCharacter
         {
             case CharacterState.Idle:
                 ani.Play("idle", 0, 0);
-                aniCollider.Play("Idle", 0, 0);
                 rb.velocity = Vector3.zero;
                 //animalAni.SetInteger("state", (int)PlayerState.Idle);
                 break;
             case CharacterState.Run:
                 ani.Play("walk", 0, 0);
-                aniCollider.Play("Walk", 0, 0);
                 //animalAni.SetInteger("state", (int)PlayerState.Walk);
                 break;
             case CharacterState.Rush:
                 ani.Play("rush", 0, 0);
-                aniCollider.Play("Rush", 0, 0);
-                break;
-            case CharacterState.Rise:
-                aniCollider.Play("Rise", 0, 0);
-                break;
-            case CharacterState.Fall:
-                aniCollider.Play("Fall", 0, 0);
                 break;
             case CharacterState.Float:
                 canMove = false;
@@ -861,7 +864,6 @@ public class Enemy : MoveCharacter
                 }
                 //ani.Play("Coma", 0, 0);
                 ani.Play("weak", 0, 0);
-                aniCollider.Play("Weak", 0, 0);
                 rb.velocity = Vector3.zero;
                 pastComaTime = 0;
                 if (canFly)
@@ -874,7 +876,6 @@ public class Enemy : MoveCharacter
                 break;
             case CharacterState.Die:
                 ani.Play("die", 0, 0);
-                aniCollider.Play("Die", 0, 0);
                 isDie = true;
                 dieKeepTime = totalDieKeepTime;
                 DropSouls();
@@ -914,7 +915,6 @@ public class Enemy : MoveCharacter
                 noOnSearchState = true;
                 ChosePlayer();
                 ani.Play("walk", 0, 0);
-                aniCollider.Play("Walk", 0, 0);
                 break;
             case CharacterState.ReadyToRush:
                 time = 0;
@@ -950,7 +950,6 @@ public class Enemy : MoveCharacter
                 else
                 {
                     ani.Play("idle", 0, 0);
-                    aniCollider.Play("Idle", 0, 0);
                 }
                 canNotChangeHurt = false;
                 break;

+ 0 - 3
ActionTowerDefense/Assets/Scripts/EnemyTower.cs

@@ -85,7 +85,6 @@ public class EnemyTower : Character
             case CharacterState.Idle:
                 break;
             case CharacterState.Attack:
-                aniCollider.Play("NotAttack", 1, 0);
                 attackTarget = null;
                 break;
             case CharacterState.Die:
@@ -100,7 +99,6 @@ public class EnemyTower : Character
         {
             case CharacterState.Idle:
                 //ani.Play("idle", 0, 0);
-                aniCollider.Play("Idle", 0, 0);
                 rb.velocity = Vector3.zero;
                 //animalAni.SetInteger("state", (int)PlayerState.Idle);
                 break;
@@ -119,7 +117,6 @@ public class EnemyTower : Character
                 break;
             case CharacterState.Die:
                 ani.Play("die", 0, 0);
-                aniCollider.Play("Die", 0, 0);
                 isDie = true;
                 dieKeepTime = totalDieKeepTime;
                 TowerMap.myTowers.Remove(gameObject);

+ 0 - 3
ActionTowerDefense/Assets/Scripts/MoveCharacter.cs

@@ -137,7 +137,6 @@ public class MoveCharacter : Character
     {
         playerMe = mecanim;
         playerAni = ani;
-        playerCol = aniCollider;
         playerTran = bodyTrans;
         playerBst = beSearchTrigger;
         playerBullet = bulletPrefab;
@@ -233,7 +232,6 @@ public class MoveCharacter : Character
         {
             RotateSelf();
             curTime += Time.deltaTime;
-            aniCollider.Play("Rise", 0, 0);
             curHeight = Mathf.SmoothDamp(curHeight, height, ref rise, riseTime);
             transform.position = new Vector3(origPos.x, curHeight, origPos.z);
             if (curHeight >= height - 0.02f)
@@ -259,7 +257,6 @@ public class MoveCharacter : Character
         }
         else if (floatState == 3)
         {
-            aniCollider.Play("Fall", 0, 0);
             if (transform.position.y >= origY + 0.05f)
             {
                 curHeight -= normalFallSpeed * Time.deltaTime;

+ 1 - 1
ActionTowerDefense/Assets/Scripts/PlayerController.cs

@@ -37,6 +37,7 @@ public class PlayerController : MoveCharacter
     public int playerId;
     public bool canJump;
     public bool endTranSummon;  //是否在结束变身后召唤英灵
+    public Animator aniCollider;
 
     [Header("变身英灵")]
     public bool isUltimate;     //英灵释放大招
@@ -2103,7 +2104,6 @@ public class PlayerController : MoveCharacter
         }
         mecanim = dem.mecanim;
         ani = dem.ani;
-        aniCollider = dem.aniCollider;
         bodyTrans = dem.bodyTrans;
         beSearchTrigger = dem.beSearchTrigger;
         bulletPrefab = dem.bulletPrefab;

+ 21 - 5
ActionTowerDefense/Assets/Scripts/Spine/SkeletonDataReader.cs

@@ -2,17 +2,32 @@ using UnityEngine;
 using Spine;
 using Spine.Unity;
 using System.Collections.Generic;
+using UnityEditor;
 
 public class SkeletonDataReader : MonoBehaviour
 {
+    public bool isEnemy;
     private SkeletonMecanim skeletonMecanim;
     private Character cha;
+    private string path;
 
     [ContextMenu("Play")]
     private void WriteData()
     {
-        ReadData();
         cha = GetComponentInParent<Character>();
+        if (isEnemy)
+        {
+            path = $"Assets/Resources/Prefab/Enemy/{cha.gameObject.name}.prefab";
+        }
+        else
+        {
+            path = $"Assets/Resources/Prefab/MySoldier/{cha.gameObject.name}.prefab";
+        }
+        GameObject prefab = AssetDatabase.LoadAssetAtPath<GameObject>(path);
+        GameObject prefabInstance = PrefabUtility.InstantiatePrefab(prefab) as GameObject;
+        ReadData();
+        PrefabUtility.SaveAsPrefabAsset(prefabInstance, path);
+        DestroyImmediate(prefabInstance);
     }
 
     private void ReadData()
@@ -65,7 +80,7 @@ public class SkeletonDataReader : MonoBehaviour
             sak.keys = new List<AttackKeyType>();
             AttackKeyType akt = new AttackKeyType();
             bool isStartKey = true;
-            bool canWrite = false;
+            int canWrite = 0;
             // ±éÀú¶¯»­ÖеÄʼþ
             foreach (var timeline in animation.Timelines)
             {
@@ -81,20 +96,21 @@ public class SkeletonDataReader : MonoBehaviour
                             akt.startKeyName = eventName;
                             akt.startKeyTime = eventTime;
                             akt.attackType = KeyType.AttackStart;
+                            canWrite = 1;
                         }
-                        else
+                        else if (canWrite == 1)
                         {
                             akt.endKeyName = eventName;
                             akt.endKeyTime = eventTime;
                             akt.endType = KeyType.AttackEnd;
                             sak.keys.Add(akt);
-                            canWrite = true;
+                            canWrite = 2;
                         }
                         isStartKey = !isStartKey;
                     }
                 }
             }
-            if(canWrite) cha.attackKeys.Add(sak);
+            if (canWrite == 2) cha.attackKeys.Add(sak);
         }
     }
 }

+ 0 - 3
ActionTowerDefense/Assets/Scripts/Tower.cs

@@ -72,7 +72,6 @@ public class Tower : Character
             case CharacterState.Idle:
                 break;
             case CharacterState.Attack:
-                aniCollider.Play("NotAttack", 1, 0);
                 attackTarget = null;
                 break;
             case CharacterState.Die:
@@ -87,7 +86,6 @@ public class Tower : Character
         {
             case CharacterState.Idle:
                 //ani.Play("idle", 0, 0);
-                aniCollider.Play("Idle", 0, 0);
                 rb.velocity = Vector3.zero;
                 //animalAni.SetInteger("state", (int)PlayerState.Idle);
                 break;
@@ -110,7 +108,6 @@ public class Tower : Character
                     GetComponentInChildren<LockSoul>().ReleaseAllSouls();
                 }
                 ani.Play("die", 0, 0);
-                aniCollider.Play("Die", 0, 0);
                 isDie = true;
                 dieKeepTime = totalDieKeepTime;
                 TowerMap.myTowers.Remove(gameObject);