Ver código fonte

龙卷扇;修复了游龙球士兵结束后在塔下左右转的问题

WGL 1 mês atrás
pai
commit
7893434d02

+ 0 - 128
ActionTowerDefense/Assets/Resources/Prefab/BaGua/Effect_LiGua.prefab

@@ -1,128 +0,0 @@
-%YAML 1.1
-%TAG !u! tag:unity3d.com,2011:
---- !u!1 &4234023256197139610
-GameObject:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  serializedVersion: 6
-  m_Component:
-  - component: {fileID: 2340096923802611277}
-  - component: {fileID: 8954824379418312413}
-  - component: {fileID: 7507774989994367828}
-  m_Layer: 0
-  m_Name: Effect_LiGua
-  m_TagString: Untagged
-  m_Icon: {fileID: 0}
-  m_NavMeshLayer: 0
-  m_StaticEditorFlags: 0
-  m_IsActive: 1
---- !u!4 &2340096923802611277
-Transform:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 4234023256197139610}
-  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:
-  - {fileID: 2685442329018336678}
-  m_Father: {fileID: 0}
-  m_RootOrder: 0
-  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
---- !u!114 &8954824379418312413
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 4234023256197139610}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: c6a1f6e135f479a4e96903b5855eb3b4, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 
-  intervalTime: 0.3
-  damage: 100
-  moveCharacrters: []
-  totalTime: 10
-  time: 0
---- !u!65 &7507774989994367828
-BoxCollider:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 4234023256197139610}
-  m_Material: {fileID: 0}
-  m_IsTrigger: 1
-  m_Enabled: 1
-  serializedVersion: 2
-  m_Size: {x: 4.4957623, y: 24.611729, z: 1}
-  m_Center: {x: 0.15332294, y: 10.885927, z: 0}
---- !u!1001 &3887524328526672740
-PrefabInstance:
-  m_ObjectHideFlags: 0
-  serializedVersion: 2
-  m_Modification:
-    m_TransformParent: {fileID: 2340096923802611277}
-    m_Modifications:
-    - target: {fileID: 1204670390151608001, guid: a7a7c1daf45ef864bbfb221b0b7ba58b, type: 3}
-      propertyPath: m_Name
-      value: Tronado_eff
-      objectReference: {fileID: 0}
-    - target: {fileID: 1204670390151608002, guid: a7a7c1daf45ef864bbfb221b0b7ba58b, type: 3}
-      propertyPath: m_RootOrder
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 1204670390151608002, guid: a7a7c1daf45ef864bbfb221b0b7ba58b, type: 3}
-      propertyPath: m_LocalPosition.x
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 1204670390151608002, guid: a7a7c1daf45ef864bbfb221b0b7ba58b, type: 3}
-      propertyPath: m_LocalPosition.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 1204670390151608002, guid: a7a7c1daf45ef864bbfb221b0b7ba58b, type: 3}
-      propertyPath: m_LocalPosition.z
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 1204670390151608002, guid: a7a7c1daf45ef864bbfb221b0b7ba58b, type: 3}
-      propertyPath: m_LocalRotation.w
-      value: 1
-      objectReference: {fileID: 0}
-    - target: {fileID: 1204670390151608002, guid: a7a7c1daf45ef864bbfb221b0b7ba58b, type: 3}
-      propertyPath: m_LocalRotation.x
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 1204670390151608002, guid: a7a7c1daf45ef864bbfb221b0b7ba58b, type: 3}
-      propertyPath: m_LocalRotation.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 1204670390151608002, guid: a7a7c1daf45ef864bbfb221b0b7ba58b, type: 3}
-      propertyPath: m_LocalRotation.z
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 1204670390151608002, guid: a7a7c1daf45ef864bbfb221b0b7ba58b, type: 3}
-      propertyPath: m_LocalEulerAnglesHint.x
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 1204670390151608002, guid: a7a7c1daf45ef864bbfb221b0b7ba58b, type: 3}
-      propertyPath: m_LocalEulerAnglesHint.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 1204670390151608002, guid: a7a7c1daf45ef864bbfb221b0b7ba58b, type: 3}
-      propertyPath: m_LocalEulerAnglesHint.z
-      value: 0
-      objectReference: {fileID: 0}
-    m_RemovedComponents: []
-  m_SourcePrefab: {fileID: 100100000, guid: a7a7c1daf45ef864bbfb221b0b7ba58b, type: 3}
---- !u!4 &2685442329018336678 stripped
-Transform:
-  m_CorrespondingSourceObject: {fileID: 1204670390151608002, guid: a7a7c1daf45ef864bbfb221b0b7ba58b, type: 3}
-  m_PrefabInstance: {fileID: 3887524328526672740}
-  m_PrefabAsset: {fileID: 0}

+ 268 - 0
ActionTowerDefense/Assets/Resources/Prefab/Conduct/TornadoFan.prefab

@@ -0,0 +1,268 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!1 &4234023256197139610
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 2340096923802611277}
+  - component: {fileID: 7507774989994367828}
+  - component: {fileID: 5825958296028587691}
+  m_Layer: 20
+  m_Name: TornadoFan
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!4 &2340096923802611277
+Transform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 4234023256197139610}
+  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:
+  - {fileID: 2685442329018336678}
+  m_Father: {fileID: 0}
+  m_RootOrder: 0
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!65 &7507774989994367828
+BoxCollider:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 4234023256197139610}
+  m_Material: {fileID: 0}
+  m_IsTrigger: 1
+  m_Enabled: 1
+  serializedVersion: 2
+  m_Size: {x: 20, y: 24.611729, z: 1}
+  m_Center: {x: 0, y: 10.885927, z: 0}
+--- !u!114 &5825958296028587691
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 4234023256197139610}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: c6a1f6e135f479a4e96903b5855eb3b4, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  canBreakWall: 0
+  wallBrealNum: 10
+  isShoot: 0
+  isSingleAttack: 0
+  isDoT: 1
+  owner: {fileID: 0}
+  cantSingleAttack: 0
+  trigedObjs: []
+  trigedTime: []
+  attackMethod:
+    attackName: 
+    attackType: 0
+    attackInfo:
+      attackValue: 0
+      damage: 0
+      attackDir: {x: 0, y: 0, z: 0}
+      criticalChance: 0
+      lifesteal: 0
+      effect: {fileID: 0}
+      attackEffect: 
+      attackMethod_Type: 0
+      floatState:
+        time: 0
+        upTime: {x: 0, y: 0}
+        backSpeed: {x: 0, y: 0}
+        rotateSpeed: {x: 0, y: 0}
+        height: {x: 0, y: 0}
+        ControlOrder: 0
+      blowUp:
+        directionType: 0
+        dir: {x: 0, y: 0, z: 0}
+        dirRandom: {x: 0, y: 0, z: 0}
+        force: 0
+        time: 0
+        haveLandingDamage: 0
+        landingDamageRate: 0
+        ControlOrder: 0
+      shotDown:
+        directionType: 0
+        dir: {x: 0, y: 0, z: 0}
+        dirRandom: {x: 0, y: 0, z: 0}
+        force: 0
+        time: 0
+        haveLandingDamage: 0
+        landingDamage: 0
+        ControlOrder: 0
+      weak:
+        time: 0
+        ControlOrder: 0
+      armorPiercing:
+        rate: 0
+      vulnerable:
+        rate: 0
+        time: 0
+      stackingWounds:
+        damage: 0
+        time: 0
+      changeDamage:
+        rate: 0
+      sustainedInjury:
+        damage: 0
+    attackTrigger: {fileID: 0}
+    needToChange: 0
+    attackDistance: 0
+    maxAttackDis: 0
+    minAttackDis: 0
+    searchMode: 0
+    canHitFly: 0
+    bulletPrefab: {fileID: 0}
+    shootPos: []
+    maxUpAngle: 0
+    maxDownAngle: 0
+    shootTrack: 0
+    shootAlwaysTrack: 0
+    skill: {fileID: 0}
+    additionalEffects: 0
+  force: {x: 0, y: 0, z: 0}
+  changeHurt: 0
+  repelValue: 0
+  offsetY: 1
+  hitRate: 1
+  interval: 0.3
+  isCreatedByDemonicSummon: 0
+  offset: 2
+  rotationRangeX: {x: 1, y: 2}
+  rotationRangeY: {x: -2, y: 2}
+  distance: 0.5
+  lerpValue: 10
+  totalAttackNum: 0
+  damage: 0
+  totalTime: 0
+  time: 0
+  targetPoss: []
+--- !u!1001 &3887524328526672740
+PrefabInstance:
+  m_ObjectHideFlags: 0
+  serializedVersion: 2
+  m_Modification:
+    m_TransformParent: {fileID: 2340096923802611277}
+    m_Modifications:
+    - target: {fileID: 360537812, guid: a7a7c1daf45ef864bbfb221b0b7ba58b, type: 3}
+      propertyPath: m_SortingLayer
+      value: 4
+      objectReference: {fileID: 0}
+    - target: {fileID: 360537812, guid: a7a7c1daf45ef864bbfb221b0b7ba58b, type: 3}
+      propertyPath: m_SortingLayerID
+      value: -1730265859
+      objectReference: {fileID: 0}
+    - target: {fileID: 1204670389046920222, guid: a7a7c1daf45ef864bbfb221b0b7ba58b, type: 3}
+      propertyPath: m_SortingLayer
+      value: 4
+      objectReference: {fileID: 0}
+    - target: {fileID: 1204670389046920222, guid: a7a7c1daf45ef864bbfb221b0b7ba58b, type: 3}
+      propertyPath: m_SortingOrder
+      value: -2
+      objectReference: {fileID: 0}
+    - target: {fileID: 1204670389046920222, guid: a7a7c1daf45ef864bbfb221b0b7ba58b, type: 3}
+      propertyPath: m_SortingLayerID
+      value: -1730265859
+      objectReference: {fileID: 0}
+    - target: {fileID: 1204670389918562869, guid: a7a7c1daf45ef864bbfb221b0b7ba58b, type: 3}
+      propertyPath: m_LocalPosition.x
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 1204670389918562869, guid: a7a7c1daf45ef864bbfb221b0b7ba58b, type: 3}
+      propertyPath: m_LocalPosition.y
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 1204670389918562870, guid: a7a7c1daf45ef864bbfb221b0b7ba58b, type: 3}
+      propertyPath: m_SortingLayer
+      value: 4
+      objectReference: {fileID: 0}
+    - target: {fileID: 1204670389918562870, guid: a7a7c1daf45ef864bbfb221b0b7ba58b, type: 3}
+      propertyPath: m_SortingOrder
+      value: -5
+      objectReference: {fileID: 0}
+    - target: {fileID: 1204670389918562870, guid: a7a7c1daf45ef864bbfb221b0b7ba58b, type: 3}
+      propertyPath: m_SortingLayerID
+      value: -1730265859
+      objectReference: {fileID: 0}
+    - target: {fileID: 1204670390151608001, guid: a7a7c1daf45ef864bbfb221b0b7ba58b, type: 3}
+      propertyPath: m_Name
+      value: Tronado_eff
+      objectReference: {fileID: 0}
+    - target: {fileID: 1204670390151608002, guid: a7a7c1daf45ef864bbfb221b0b7ba58b, type: 3}
+      propertyPath: m_RootOrder
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 1204670390151608002, guid: a7a7c1daf45ef864bbfb221b0b7ba58b, type: 3}
+      propertyPath: m_LocalPosition.x
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 1204670390151608002, guid: a7a7c1daf45ef864bbfb221b0b7ba58b, type: 3}
+      propertyPath: m_LocalPosition.y
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 1204670390151608002, guid: a7a7c1daf45ef864bbfb221b0b7ba58b, type: 3}
+      propertyPath: m_LocalPosition.z
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 1204670390151608002, guid: a7a7c1daf45ef864bbfb221b0b7ba58b, type: 3}
+      propertyPath: m_LocalRotation.w
+      value: 1
+      objectReference: {fileID: 0}
+    - target: {fileID: 1204670390151608002, guid: a7a7c1daf45ef864bbfb221b0b7ba58b, type: 3}
+      propertyPath: m_LocalRotation.x
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 1204670390151608002, guid: a7a7c1daf45ef864bbfb221b0b7ba58b, type: 3}
+      propertyPath: m_LocalRotation.y
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 1204670390151608002, guid: a7a7c1daf45ef864bbfb221b0b7ba58b, type: 3}
+      propertyPath: m_LocalRotation.z
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 1204670390151608002, guid: a7a7c1daf45ef864bbfb221b0b7ba58b, type: 3}
+      propertyPath: m_LocalEulerAnglesHint.x
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 1204670390151608002, guid: a7a7c1daf45ef864bbfb221b0b7ba58b, type: 3}
+      propertyPath: m_LocalEulerAnglesHint.y
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 1204670390151608002, guid: a7a7c1daf45ef864bbfb221b0b7ba58b, type: 3}
+      propertyPath: m_LocalEulerAnglesHint.z
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 1204670390350795123, guid: a7a7c1daf45ef864bbfb221b0b7ba58b, type: 3}
+      propertyPath: m_SortingLayer
+      value: 4
+      objectReference: {fileID: 0}
+    - target: {fileID: 1204670390350795123, guid: a7a7c1daf45ef864bbfb221b0b7ba58b, type: 3}
+      propertyPath: m_SortingOrder
+      value: -1
+      objectReference: {fileID: 0}
+    - target: {fileID: 1204670390350795123, guid: a7a7c1daf45ef864bbfb221b0b7ba58b, type: 3}
+      propertyPath: m_SortingLayerID
+      value: -1730265859
+      objectReference: {fileID: 0}
+    m_RemovedComponents: []
+  m_SourcePrefab: {fileID: 100100000, guid: a7a7c1daf45ef864bbfb221b0b7ba58b, type: 3}
+--- !u!4 &2685442329018336678 stripped
+Transform:
+  m_CorrespondingSourceObject: {fileID: 1204670390151608002, guid: a7a7c1daf45ef864bbfb221b0b7ba58b, type: 3}
+  m_PrefabInstance: {fileID: 3887524328526672740}
+  m_PrefabAsset: {fileID: 0}

+ 0 - 0
ActionTowerDefense/Assets/Resources/Prefab/BaGua/Effect_LiGua.prefab.meta → ActionTowerDefense/Assets/Resources/Prefab/Conduct/TornadoFan.prefab.meta


+ 4 - 0
ActionTowerDefense/Assets/Resources/Prefab/FX/Tronado_eff.prefab

@@ -34052,6 +34052,10 @@ PrefabInstance:
       propertyPath: m_Name
       value: tornado_mesh
       objectReference: {fileID: 0}
+    - target: {fileID: 919132149155446097, guid: ed2490773d44f134ebe8e629959c58b9, type: 3}
+      propertyPath: m_IsActive
+      value: 0
+      objectReference: {fileID: 0}
     m_RemovedComponents: []
   m_SourcePrefab: {fileID: 100100000, guid: ed2490773d44f134ebe8e629959c58b9, type: 3}
 --- !u!4 &1674600374741409398 stripped

+ 18 - 74
ActionTowerDefense/Assets/Resources/Prefab/GameManager.prefab

@@ -96,6 +96,9 @@ MonoBehaviour:
   forceToGround: 100
   landingDamageRate: 1
   forceToFly: 80
+  isWindThunderEnable: 0
+  windThunderProbability: 100
+  thunderboltDamage: 8
   isWoodEnable: 0
   woodProbability: 15
   isRockEnable: 0
@@ -105,6 +108,8 @@ MonoBehaviour:
   attackRate: 0.05
   isGroundEnable: 0
   hpRate: 0.05
+  isSkyGroundIceEnable: 0
+  skyGroundProbability: 100
   tagWeight:
   - 20
   - 15
@@ -167,17 +172,6 @@ MonoBehaviour:
   m_EditorClassIdentifier: 
   netherfireRebirth:
     attributeTag: 7
-    bUseFixedSacrifice: 1
-    sacrificeRatio:
-    - 100
-    - 60
-    - 50
-    - 50
-    cd:
-    - 20
-    - 15
-    - 10
-    - 5
     sacrificeValue: 0a0000000a0000000a0000000a000000
     power:
     - 1
@@ -193,17 +187,6 @@ MonoBehaviour:
     canDie: 0
   flyingSwords:
     attributeTag: 6
-    bUseFixedSacrifice: 1
-    sacrificeRatio:
-    - 100
-    - 80
-    - 60
-    - 50
-    cd:
-    - 20
-    - 15
-    - 10
-    - 10
     sacrificeValue: 0a0000000a0000000a0000000a000000
     power:
     - 2
@@ -218,17 +201,6 @@ MonoBehaviour:
     obj: {fileID: 256012001268456902, guid: 26ed0fb31296bdd4bb45e22ce2b925bc, type: 3}
   iceRain:
     attributeTag: 3
-    bUseFixedSacrifice: 1
-    sacrificeRatio:
-    - 100
-    - 60
-    - 50
-    - 50
-    cd:
-    - 20
-    - 15
-    - 10
-    - 5
     sacrificeValue: 0a0000000a0000000a0000000a000000
     power:
     - 3
@@ -243,17 +215,6 @@ MonoBehaviour:
     obj: {fileID: 256012001268456902, guid: 758282baf4c34f04a86e4bb81a0afbdd, type: 3}
   barrier:
     attributeTag: 4
-    bUseFixedSacrifice: 0
-    sacrificeRatio:
-    - 100
-    - 60
-    - 50
-    - 50
-    cd:
-    - 20
-    - 15
-    - 10
-    - 5
     sacrificeValue: 0a0000000a0000000a0000000a000000
     power:
     - 1
@@ -268,17 +229,6 @@ MonoBehaviour:
     obj: {fileID: 256012001268456902, guid: ba2e5bcb5c7ac604ea72b2fcb544a3cb, type: 3}
   spiritBloodAggregator:
     attributeTag: 5
-    bUseFixedSacrifice: 1
-    sacrificeRatio:
-    - 100
-    - 60
-    - 50
-    - 50
-    cd:
-    - 20
-    - 15
-    - 10
-    - 5
     sacrificeValue: 0a0000000a0000000a0000000a000000
     power:
     - 1
@@ -292,17 +242,6 @@ MonoBehaviour:
     - 4
   wanderingDragonOrb:
     attributeTag: 1
-    bUseFixedSacrifice: 1
-    sacrificeRatio:
-    - 100
-    - 60
-    - 50
-    - 50
-    cd:
-    - 20
-    - 15
-    - 10
-    - 5
     sacrificeValue: 140000001e0000002800000032000000
     power:
     - 0.3
@@ -316,14 +255,19 @@ MonoBehaviour:
     - 4
     obj: {fileID: 256012001268456902, guid: d682c4f893ea2364ba164892a71ceb8b, type: 3}
   tornadoFan:
-    attributeTag: 0
-    bUseFixedSacrifice: 0
-    sacrificeRatio: []
-    cd: []
-    sacrificeValue: 
-    power: []
-    effectBonus: []
-    obj: {fileID: 0}
+    attributeTag: 2
+    sacrificeValue: 0a0000000a0000000a0000000a000000
+    power:
+    - 1
+    - 2
+    - 3
+    - 4
+    effectBonus:
+    - 1
+    - 2
+    - 3
+    - 4
+    obj: {fileID: 4234023256197139610, guid: cdf0d0226ad7cd04aa941d3bf6c919ec, type: 3}
 --- !u!114 &1880576200062196086
 MonoBehaviour:
   m_ObjectHideFlags: 0

+ 0 - 63
ActionTowerDefense/Assets/Scripts/BaGua/BaGua_LiGua.cs

@@ -1,63 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-public class BaGua_LiGua : MonoBehaviour
-{
-    public float intervalTime;                                              //造成伤害的间隔时间
-    public int damage;                                                      //造成的伤害
-    public List<MoveCharacter> moveCharacrters = new List<MoveCharacter>(); //被造成伤害的角色
-    public float totalTime;                                                 //多少时间后消失
-    [HideInInspector]public float time;                                     //经过的时间
-
-    private void Update()
-    {
-        time += Time.deltaTime;
-        if (time >= totalTime)
-        {
-            gameObject.SetActive(false);
-        }
-    }
-
-    private void OnTriggerEnter(Collider other)
-    {
-        BeHitTrigger beHitTrigger = other.GetComponent<BeHitTrigger>();
-        if (beHitTrigger != null)
-        {
-            if (other.gameObject.layer == 8 || other.gameObject.layer == 16 || other.gameObject.layer == 10)
-            {
-                MoveCharacter character = other.GetComponentInParent<MoveCharacter>();
-                moveCharacrters.Add(character);
-                character.sustainedInjuryTime = intervalTime;
-                character.sustainedInjury_IntervalTime = intervalTime;
-                character.sustainedInjury_damage = damage;
-                character.isSustainedInjury = true;
-            }
-        }
-    }
-
-    private void OnTriggerExit(Collider other)
-    {
-        BeHitTrigger beHitTrigger = other.GetComponent<BeHitTrigger>();
-        if (beHitTrigger != null)
-        {
-            if (other.gameObject.layer == 8 || other.gameObject.layer == 16)
-            {
-                MoveCharacter character = other.GetComponentInParent<MoveCharacter>();
-                if (moveCharacrters.Exists(i => i == character))
-                {
-                    character.isSustainedInjury = false;
-                    moveCharacrters.Remove(character);
-                }
-            }
-        }
-    }
-
-    private void OnDisable()
-    {
-        for(int i= 0; i < moveCharacrters.Count; i++)
-        {
-            moveCharacrters[i].isSustainedInjury = false;
-        }
-    }
-}

+ 57 - 7
ActionTowerDefense/Assets/Scripts/Characters/AttackTrigger.cs

@@ -10,15 +10,15 @@ public class AttackTrigger : MonoBehaviour
     [FoldoutGroup("场景交互-墙")] [LabelText("能破墙")] public bool canBreakWall;
     [FoldoutGroup("场景交互-墙")] public int wallBrealNum = 10;
 
-    [Header("是否是远程角色")]
-    public bool isShoot;
+    [FoldoutGroup("条件")] [LabelText("是否是远程角色")] public bool isShoot;
+    [FoldoutGroup("条件")] [LabelText("是否为单体攻击")] public bool isSingleAttack;
+    [FoldoutGroup("条件")] [LabelText("持续伤害")] public bool isDoT;
 
     public Character owner;
-    [Header("是否为单体攻击")]
-    public bool isSingleAttack;
     public bool cantSingleAttack;    //单体攻击单位是否已经攻击了
     [Header("攻击对象")]
     public List<BeHitTrigger> trigedObjs;
+    public List<float> trigedTime;
     [Header("攻击属性")]
     public AttackController.AttackMethod attackMethod;
     public Vector3 force;
@@ -26,6 +26,7 @@ public class AttackTrigger : MonoBehaviour
     public float repelValue;
     public int offsetY = 1;
     public float hitRate = 1;
+    [LabelText("伤害间隔时间")]public float interval;
 
     [Header("是否由士兵起手式创建")]
     public bool isCreatedByDemonicSummon = false;
@@ -35,15 +36,17 @@ public class AttackTrigger : MonoBehaviour
         owner = GetComponentInParent<Character>();
     }
 
+    public virtual void Update()
+    {
+        DoT();
+    }
+
     protected virtual void OnTriggerEnter(Collider other)
     {
         if (isShoot) return;
-
         if (!other.TryGetComponent(out BeHitTrigger hitTrigger)) return;
-
         Character hitOwner = hitTrigger.owner;
         if (hitOwner == null || hitOwner.isDie) return;
-
         if (isSingleAttack && cantSingleAttack) return;
 
         AttackController attackController = owner.attackController;
@@ -52,6 +55,11 @@ public class AttackTrigger : MonoBehaviour
         if (!IsValidTargetType(attackController.targetTypes, otherTargetType)) return;
 
         trigedObjs.Add(hitTrigger);
+        if (isDoT)
+        {
+            trigedTime.Add(0);
+            return;
+        }
         hitTrigger.BeHit(attackMethod, owner);
         if (hitTrigger.owner.debugAttackFrom)
         {
@@ -87,9 +95,20 @@ public class AttackTrigger : MonoBehaviour
         return GameManager.TagToTargetTypeMap.TryGetValue(tag, out targetType);
     }
 
+    private void OnTriggerExit(Collider other)
+    {
+        if (!isDoT) return;
+        if (!other.TryGetComponent(out BeHitTrigger hitTrigger)) return;
+        int index = trigedObjs.IndexOf(hitTrigger);
+        if (index == -1) return;
+        trigedObjs.RemoveAt(index);
+        trigedTime.RemoveAt(index);
+    }
+
     protected virtual void OnEnable()
     {
         trigedObjs.Clear();
+        trigedTime.Clear();
         cantSingleAttack = false;
         if (isShoot)
         {
@@ -119,4 +138,35 @@ public class AttackTrigger : MonoBehaviour
             isCreatedByDemonicSummon = false;
         }
     }
+
+    public void DoT()
+    {
+        if (!isDoT) return;
+        List<int> dieIndex = new List<int>();
+        for(int i = 0; i < trigedObjs.Count; i++)
+        {
+            BeHitTrigger beHitTrigger = trigedObjs[i];
+            float time = trigedTime[i];
+            if (beHitTrigger.owner.isDie)
+            {
+                dieIndex.Add(i);
+                continue;
+            }
+            time -= Time.deltaTime;
+            if(time <= 0)
+            {
+                trigedTime[i] = interval;
+                beHitTrigger.BeHit(attackMethod, owner);
+            }
+            else
+            {
+                trigedTime[i] = time;
+            }
+        }
+        for(int i = dieIndex.Count - 1; i >= 0; i--)
+        {
+            trigedObjs.RemoveAt(i);
+            trigedTime.RemoveAt(i);
+        }
+    }
 }

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

@@ -34,6 +34,7 @@ public enum CharacterState
 
     LockSoul = 25,          //在锁魂塔中
     Conduct = 26,           //在指挥中
+    Another,                //其他
 }
 
 public class Character : MonoBehaviour

+ 14 - 18
ActionTowerDefense/Assets/Scripts/Conduct/ConductController.cs

@@ -37,45 +37,31 @@ public class ConductController : MonoBehaviour
             {
                 case ConductSkills.NetherfireRebirth:
                     ConductManager.NetherfireRebirth netherfireRebirth = conductManager.netherfireRebirth;
-                    bUseFixedSacrifice[i] = netherfireRebirth.bUseFixedSacrifice;
-                    conversionRate[i] = netherfireRebirth.sacrificeRatio[demonicRarity];
                     sacrificeValue[i] = netherfireRebirth.sacrificeValue[demonicRarity];
-                    totalCD[i] = netherfireRebirth.cd[demonicRarity];
                     break;
                 case ConductSkills.FlyingSwords:
                     ConductManager.FlyingSwords flyingSwords = conductManager.flyingSwords;
-                    bUseFixedSacrifice[i] = flyingSwords.bUseFixedSacrifice;
-                    conversionRate[i] = flyingSwords.sacrificeRatio[demonicRarity];
                     sacrificeValue[i] = flyingSwords.sacrificeValue[demonicRarity];
-                    totalCD[i] = flyingSwords.cd[demonicRarity];
                     break;
                 case ConductSkills.IceRain:
                     ConductManager.IceRain iceRain = conductManager.iceRain;
-                    bUseFixedSacrifice[i] = iceRain.bUseFixedSacrifice;
-                    conversionRate[i] = iceRain.sacrificeRatio[demonicRarity];
                     sacrificeValue[i] = iceRain.sacrificeValue[demonicRarity];
-                    totalCD[i] = iceRain.cd[demonicRarity];
                     break;
                 case ConductSkills.Barrier:
                     ConductManager.Barrier barrier = conductManager.barrier;
-                    bUseFixedSacrifice[i] = barrier.bUseFixedSacrifice;
-                    conversionRate[i] = barrier.sacrificeRatio[demonicRarity];
                     sacrificeValue[i] = barrier.sacrificeValue[demonicRarity];
-                    totalCD[i] = barrier.cd[demonicRarity];
                     break;
                 case ConductSkills.SpiritBloodAggregator:
                     ConductManager.SpiritBloodAggregator spiritBloodAggregator = conductManager.spiritBloodAggregator;
-                    bUseFixedSacrifice[i] = spiritBloodAggregator.bUseFixedSacrifice;
-                    conversionRate[i] = spiritBloodAggregator.sacrificeRatio[demonicRarity];
                     sacrificeValue[i] = spiritBloodAggregator.sacrificeValue[demonicRarity];
-                    totalCD[i] = spiritBloodAggregator.cd[demonicRarity];
                     break;
                 case ConductSkills.WanderingDragonOrb:
                     ConductManager.WanderingDragonOrb wanderingDragonOrb = conductManager.wanderingDragonOrb;
-                    bUseFixedSacrifice[i] = wanderingDragonOrb.bUseFixedSacrifice;
-                    conversionRate[i] = wanderingDragonOrb.sacrificeRatio[demonicRarity];
                     sacrificeValue[i] = wanderingDragonOrb.sacrificeValue[demonicRarity];
-                    totalCD[i] = wanderingDragonOrb.cd[demonicRarity];
+                    break;
+                case ConductSkills.TornadoFan:
+                    ConductManager.TornadoFan tornadoFan = conductManager.tornadoFan;
+                    sacrificeValue[i] = tornadoFan.sacrificeValue[demonicRarity];
                     break;
             }
         }
@@ -232,6 +218,16 @@ public class ConductController : MonoBehaviour
                 dragonController.player = playerController;
                 dragonController.Init();
                 break;
+            case ConductSkills.TornadoFan:
+                ConductManager.TornadoFan tornadoFan = conductManager.tornadoFan;
+                obj = PoolManager.Instantiate(tornadoFan.obj);
+                TornadoFan tf = obj.GetComponent<TornadoFan>();
+                tf.owner = playerController;
+                tf.totalTime = Mathf.RoundToInt(dienum * tornadoFan.power[demonicRarity]);
+                tagAdd += tornadoFan.effectBonus[demonicRarity] * myTreasureTag[(int)tornadoFan.attributeTag - 1] / 100;
+                tf.damage = (int)(attackDamage * tagAdd);
+                tf.Init();
+                break;
         }
     }
 }

+ 9 - 29
ActionTowerDefense/Assets/Scripts/Conduct/ConductManager.cs

@@ -13,6 +13,7 @@ public enum ConductSkills
     [LabelText("保护罩")] Barrier,
     [LabelText("灵血聚合器")] SpiritBloodAggregator,
     [LabelText("游龙球")] WanderingDragonOrb,
+    [LabelText("龙卷扇")] TornadoFan,
     
 }
 public class ConductManager : MonoBehaviour
@@ -23,10 +24,7 @@ public class ConductManager : MonoBehaviour
     [Serializable] public struct NetherfireRebirth
     {
         [LabelText("标签")] public AttributeTag attributeTag;
-        [LabelText("献祭方式")] [Tooltip("勾选定额;不勾选百分比")] public bool bUseFixedSacrifice;
-        [ShowIf("@!bUseFixedSacrifice")][LabelText("献祭比例(%)")] public float[] sacrificeRatio;
-        [ShowIf("@!bUseFixedSacrifice")] [LabelText("CD")] public float[] cd;
-        [ShowIf("bUseFixedSacrifice")][LabelText("献祭数量")] public int[] sacrificeValue;
+        [LabelText("献祭数量")] public int[] sacrificeValue;
         [LabelText("效果规模")] public float[] power;
         [LabelText("效果加成(%)")] public float[] effectBonus;
         [LabelText("随机范围")] public Vector2 randomRange;
@@ -38,10 +36,7 @@ public class ConductManager : MonoBehaviour
     [Serializable] public struct FlyingSwords
     {
         [LabelText("标签")] public AttributeTag attributeTag;
-        [LabelText("献祭方式")] [Tooltip("勾选定额;不勾选百分比")] public bool bUseFixedSacrifice;
-        [ShowIf("@!bUseFixedSacrifice")] [LabelText("献祭比例(%)")] public float[] sacrificeRatio;
-        [ShowIf("@!bUseFixedSacrifice")] [LabelText("CD")] public float[] cd;
-        [ShowIf("bUseFixedSacrifice")] [LabelText("献祭数量")] public int[] sacrificeValue;
+        [LabelText("献祭数量")] public int[] sacrificeValue;
         [LabelText("效果规模")] public float[] power;
         [LabelText("效果加成(%)")] public float[] effectBonus;
         public GameObject obj;
@@ -52,10 +47,7 @@ public class ConductManager : MonoBehaviour
     [Serializable] public struct IceRain
     {
         [LabelText("标签")] public AttributeTag attributeTag;
-        [LabelText("献祭方式")] [Tooltip("勾选定额;不勾选百分比")] public bool bUseFixedSacrifice;
-        [ShowIf("@!bUseFixedSacrifice")] [LabelText("献祭比例(%)")] public float[] sacrificeRatio;
-        [ShowIf("@!bUseFixedSacrifice")] [LabelText("CD")] public float[] cd;
-        [ShowIf("bUseFixedSacrifice")] [LabelText("献祭数量")] public int[] sacrificeValue;
+        [LabelText("献祭数量")] public int[] sacrificeValue;
         [LabelText("效果规模")] public float[] power;
         [LabelText("效果加成(%)")] public float[] effectBonus;
         public GameObject obj;
@@ -66,10 +58,7 @@ public class ConductManager : MonoBehaviour
     [Serializable] public struct Barrier
     {
         [LabelText("标签")] public AttributeTag attributeTag;
-        [LabelText("献祭方式")] [Tooltip("勾选定额;不勾选百分比")] public bool bUseFixedSacrifice;
-        [ShowIf("@!bUseFixedSacrifice")] [LabelText("献祭比例(%)")] public float[] sacrificeRatio;
-        [ShowIf("@!bUseFixedSacrifice")] [LabelText("CD")] public float[] cd;
-        [ShowIf("bUseFixedSacrifice")] [LabelText("献祭数量")] public int[] sacrificeValue;
+        [LabelText("献祭数量")] public int[] sacrificeValue;
         [LabelText("效果规模")] public float[] power;
         [LabelText("效果加成(%)")] public float[] effectBonus;
         public GameObject obj;
@@ -80,10 +69,7 @@ public class ConductManager : MonoBehaviour
     [Serializable] public struct SpiritBloodAggregator
     {
         [LabelText("标签")] public AttributeTag attributeTag;
-        [LabelText("献祭方式")] [Tooltip("勾选定额;不勾选百分比")] public bool bUseFixedSacrifice;
-        [ShowIf("@!bUseFixedSacrifice")] [LabelText("献祭比例(%)")] public float[] sacrificeRatio;
-        [ShowIf("@!bUseFixedSacrifice")] [LabelText("CD")] public float[] cd;
-        [ShowIf("bUseFixedSacrifice")] [LabelText("献祭数量")] public int[] sacrificeValue;
+        [LabelText("献祭数量")] public int[] sacrificeValue;
         [LabelText("效果规模")] public float[] power;
         [LabelText("效果加成(%)")] public float[] effectBonus;
     }
@@ -93,10 +79,7 @@ public class ConductManager : MonoBehaviour
     [Serializable] public struct WanderingDragonOrb
     {
         [LabelText("标签")] public AttributeTag attributeTag;
-        [LabelText("献祭方式")] [Tooltip("勾选定额;不勾选百分比")] public bool bUseFixedSacrifice;
-        [ShowIf("@!bUseFixedSacrifice")] [LabelText("献祭比例(%)")] public float[] sacrificeRatio;
-        [ShowIf("@!bUseFixedSacrifice")] [LabelText("CD")] public float[] cd;
-        [ShowIf("bUseFixedSacrifice")] [LabelText("献祭数量")] public int[] sacrificeValue;
+        [LabelText("献祭数量")] public int[] sacrificeValue;
         [LabelText("效果规模")] public float[] power;
         [LabelText("效果加成(%)")] public float[] effectBonus;
         public GameObject obj;
@@ -107,15 +90,12 @@ public class ConductManager : MonoBehaviour
     [Serializable] public struct TornadoFan
     {
         [LabelText("标签")] public AttributeTag attributeTag;
-        [LabelText("献祭方式")] [Tooltip("勾选定额;不勾选百分比")] public bool bUseFixedSacrifice;
-        [ShowIf("@!bUseFixedSacrifice")] [LabelText("献祭比例(%)")] public float[] sacrificeRatio;
-        [ShowIf("@!bUseFixedSacrifice")] [LabelText("CD")] public float[] cd;
-        [ShowIf("bUseFixedSacrifice")] [LabelText("献祭数量")] public int[] sacrificeValue;
+        [LabelText("献祭数量")] public int[] sacrificeValue;
         [LabelText("效果规模")] public float[] power;
         [LabelText("效果加成(%)")] public float[] effectBonus;
         public GameObject obj;
     }
-    [LabelText("游龙球")] public TornadoFan tornadoFan;
+    [LabelText("龙卷扇")] public TornadoFan tornadoFan;
 
     private void Awake()
     {

+ 1 - 0
ActionTowerDefense/Assets/Scripts/Conduct/DragonController.cs

@@ -68,6 +68,7 @@ public class DragonController : MonoBehaviour
             demonic.beSearchTrigger.gameObject.SetActive(true);
             demonic.dragonTrigger.gameObject.SetActive(false);
             demonic.flyHeight = demonic.transform.position.y;
+            demonic.attackController.curAttackMethod = demonic.attackController.attackMethod_march[0];
             if (!player.demonicDic.ContainsKey(demonicId))
             {
                 player.demonicDic.Add(demonicId, new List<Demonic>());

+ 117 - 0
ActionTowerDefense/Assets/Scripts/Conduct/TornadoFan.cs

@@ -0,0 +1,117 @@
+using Sirenix.OdinInspector;
+using System.Collections.Generic;
+using UnityEngine;
+
+public class TornadoFan : AttackTrigger
+{
+    [Space(30)]
+    [Title("TornadoFan属性")]
+    [LabelText("相对主角距离")] public float offset;
+    [LabelText("相对于轴心旋转范围")] public Vector2 rotationRangeX;
+    [LabelText("Y轴差值范围")] public Vector2 rotationRangeY;
+    [LabelText("重新判定距离")] public float distance;
+    public float lerpValue;
+    [DisplayOnly] public int damage;
+    [DisplayOnly] public float totalTime;
+    [DisplayOnly] public float time;                                     //经过的时间
+    public List<Vector3> targetPoss;
+
+    public override void Update()
+    {
+        base.Update();
+        time += Time.deltaTime;
+        if (time >= totalTime)
+        {
+            for (int i = 0; i < trigedObjs.Count; i++)
+            {
+                BeHitTrigger beHitTrigger = trigedObjs[i];
+                MoveCharacter moveCharacter = beHitTrigger.owner as MoveCharacter;
+                if (moveCharacter != null)
+                {
+                    moveCharacter.ChangeState(CharacterState.Idle);
+                    bool canfly = moveCharacter.canFly;
+                    moveCharacter.rb.useGravity = !canfly;
+                    moveCharacter.nowCanFly = canfly;
+                }
+            }
+            gameObject.SetActive(false);
+            return;
+        }
+        int targetLen = targetPoss.Count;
+        int trigedLen = trigedObjs.Count;
+        if (targetLen < trigedLen)
+        {
+            for (int i = 0; i < trigedLen - targetLen; i++)
+            {
+                targetPoss.Add(CalculateTargetPos(trigedObjs[trigedLen - i - 1].owner.transform.position));
+            }
+        }
+        else if (targetLen > trigedLen)
+        {
+            for (int i = 0; i < targetLen - trigedLen; i++)
+            {
+                targetPoss.RemoveAt(0);
+            }
+        }
+        for (int i = 0; i < targetPoss.Count; i++)
+            //for (int i = 0; i < trigedObjs.Count; i++)
+        {
+            BeHitTrigger beHitTrigger = trigedObjs[i];
+            MoveCharacter moveCharacter = beHitTrigger.owner as MoveCharacter;
+            if (moveCharacter != null)
+            {
+                if (moveCharacter.state != CharacterState.Another && moveCharacter.state != CharacterState.Die)
+                {
+                    moveCharacter.ChangeState(CharacterState.Another);
+                    if (moveCharacter.nowCanFly == false)
+                    {
+                        moveCharacter.rb.useGravity = false;
+                        moveCharacter.nowCanFly = true;
+                    }
+                }
+
+                Vector3 nowPos = moveCharacter.transform.position;
+                Vector3 targetPos = nowPos;
+                targetPos.x = transform.position.x;
+                if (Vector3.Distance(nowPos, targetPoss[i]) < distance)
+                {
+                    targetPoss[i] = CalculateTargetPos(nowPos);
+                }
+                moveCharacter.transform.position = Vector3.Lerp(nowPos, targetPoss[i], lerpValue * Time.deltaTime);
+                //moveCharacter.transform.position = Vector3.Lerp(nowPos, targetPos, lerpValue * Time.deltaTime);
+            }
+        }
+    }
+
+    public void Init()
+    {
+        float dir = owner.bodyTrans.localScale.x;
+        Vector3 targetPos = owner.transform.position;
+        if (dir > 0)
+        {
+            targetPos -= new Vector3(offset,0,0);
+        }
+        else
+        {
+            targetPos += new Vector3(offset, 0, 0);
+        }
+        targetPos.y = 0;
+        attackMethod.attackInfo.damage = damage;
+        transform.position = targetPos;
+        targetPoss = new List<Vector3>();
+    }
+
+    public Vector3 CalculateTargetPos(Vector3 originalPos)
+    {
+        float dir = originalPos.x < transform.position.x ? 1 : -1;
+        Vector3 targetPos = transform.position;
+        targetPos.x += dir * Random.Range(rotationRangeX.x,rotationRangeX.y);
+        Vector2 rangeY = new Vector2(targetPos.y + rotationRangeY.x, targetPos.y + rotationRangeY.y);
+        if(rangeY.x < 0)
+        {
+            rangeY.x = 0;
+        }
+        targetPos.y = Random.Range(rangeY.x, rangeY.y);
+        return targetPos;
+    }
+}

+ 0 - 0
ActionTowerDefense/Assets/Scripts/BaGua/BaGua_LiGua.cs.meta → ActionTowerDefense/Assets/Scripts/Conduct/TornadoFan.cs.meta