Bladeren bron

滚石怪功能拓展

GrainFull 1 maand geleden
bovenliggende
commit
2c342328ef

+ 190 - 156
ActionTowerDefense/Assets/Resources/Prefab/Enemy/Enemy_RockRoller.prefab

@@ -77,8 +77,8 @@ BoxCollider:
   m_IsTrigger: 1
   m_Enabled: 1
   serializedVersion: 2
-  m_Size: {x: 0.65680724, y: 4.8293552, z: 2}
-  m_Center: {x: -2.9070067, y: 2.3196778, z: 0}
+  m_Size: {x: 1.1805923, y: 3.5820045, z: 2}
+  m_Center: {x: 1.197003, y: 1.6960022, z: 0}
 --- !u!114 &7494721769656590307
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -105,6 +105,8 @@ MonoBehaviour:
       attackValue: 0
       damage: 0
       attackDir: {x: 0, y: 0, z: 0}
+      criticalChance: 0
+      lifesteal: 0
       effect: {fileID: 0}
       attackEffect: 
       attackMethod_Type: 0
@@ -167,6 +169,16 @@ MonoBehaviour:
   repelValue: 0
   offsetY: 1
   hitRate: 1
+  fatName: "\u76FE\u7532\u5175"
+  rockRoller: {fileID: 5440846222648032759}
+  impactRockForcDriction: {x: -1, y: 0.5, z: 0}
+  impactRockHitedForcDriction: {x: -1, y: 0.5, z: 0}
+  impactFatForcDriction: {x: 1, y: 0.5, z: 0}
+  fatForceMul: 250
+  rockForceMul: 80
+  collisionStopDuration: 1
+  curStopTime: 0
+  attcakFat: []
 --- !u!1 &2353298311948367420
 GameObject:
   m_ObjectHideFlags: 0
@@ -261,9 +273,9 @@ GameObject:
   m_Component:
   - component: {fileID: 6069085609270885073}
   - component: {fileID: 5217712517297835056}
-  - component: {fileID: 3377671071202039733}
   - component: {fileID: 6665864621919866219}
   - component: {fileID: 5531803388628851645}
+  - component: {fileID: 5215008785419704458}
   m_Layer: 19
   m_Name: BeHitTrigger
   m_TagString: Untagged
@@ -299,22 +311,6 @@ BoxCollider:
   serializedVersion: 2
   m_Size: {x: 2.6, y: 2.2, z: 2}
   m_Center: {x: 0.04, y: 1.08, z: 0}
---- !u!114 &3377671071202039733
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 2460330936527559963}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: 8b2c8973c65adf4448805aa906f6ad29, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 
-  owner: {fileID: 3719607727864895532}
-  attackerID: 0
-  curX: 0
-  mats: []
 --- !u!114 &6665864621919866219
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -335,6 +331,8 @@ MonoBehaviour:
       attackValue: 0
       damage: 0
       attackDir: {x: 0, y: 0, z: 0}
+      criticalChance: 0
+      lifesteal: 0
       effect: {fileID: 0}
       attackEffect: 
       attackMethod_Type: 0
@@ -415,6 +413,7 @@ MonoBehaviour:
     ShotDown: 0
     Weak: 0
     armor: 0
+    dodge: 0
 --- !u!114 &5531803388628851645
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -439,6 +438,8 @@ MonoBehaviour:
       attackValue: 0
       damage: 0
       attackDir: {x: 0, y: 0, z: 0}
+      criticalChance: 0
+      lifesteal: 0
       effect: {fileID: 0}
       attackEffect: 
       attackMethod_Type: 0
@@ -500,6 +501,25 @@ MonoBehaviour:
   hitStunTime: 0
   canHitStun: 0
   canBeHitStun: 1
+--- !u!114 &5215008785419704458
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 2460330936527559963}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 469242c748dbd5f4086a9a11e1df3d2a, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  owner: {fileID: 389370483430162252}
+  attackerID: 0
+  curX: 0
+  mats: []
+  attackTime: 2
+  curAttackTime: 0
+  fatName: "\u76FE\u7532\u5175"
 --- !u!1 &4263167930189685877
 GameObject:
   m_ObjectHideFlags: 0
@@ -572,6 +592,8 @@ MonoBehaviour:
       attackValue: 0
       damage: 0
       attackDir: {x: 0, y: 0, z: 0}
+      criticalChance: 0
+      lifesteal: 0
       effect: {fileID: 0}
       attackEffect: 01000000
       attackMethod_Type: 0
@@ -634,6 +656,16 @@ MonoBehaviour:
   repelValue: 0
   offsetY: 1
   hitRate: 1
+  fatName: "\u76FE\u7532\u5175"
+  rockRoller: {fileID: 5440846222648032759}
+  impactRockForcDriction: {x: -1, y: 0.2, z: 0}
+  impactRockHitedForcDriction: {x: -1, y: 0.2, z: 0}
+  impactFatForcDriction: {x: 1, y: 0.2, z: 0}
+  fatForceMul: 100
+  rockForceMul: 100
+  collisionStopDuration: 0.2
+  curStopTime: 0
+  attcakFat: []
 --- !u!1 &4480734502875862885
 GameObject:
   m_ObjectHideFlags: 0
@@ -651,7 +683,7 @@ GameObject:
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 1
+  m_IsActive: 0
 --- !u!4 &6207242290232856985
 Transform:
   m_ObjectHideFlags: 0
@@ -868,7 +900,6 @@ GameObject:
   serializedVersion: 6
   m_Component:
   - component: {fileID: 5440846222648032754}
-  - component: {fileID: 3719607727864895532}
   - component: {fileID: 5440846222648032765}
   - component: {fileID: 2979723395943220326}
   - component: {fileID: 389370483430162252}
@@ -898,132 +929,6 @@ Transform:
   m_Father: {fileID: 0}
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
---- !u!114 &3719607727864895532
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 5440846222648032759}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: 7475a7d33f657b146a4994b1e02710ad, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 
-  rb: {fileID: 5440846222648032765}
-  bodyTrans: {fileID: 6459001683917408033}
-  beSearchTrigger: {fileID: 4259433079752244006}
-  searchTrigger: {fileID: 2932762729738363159}
-  bodyCollider: {fileID: 4543619153787591511}
-  uiHp: {fileID: 478072938412589135}
-  beHitTrigger: {fileID: 3377671071202039733}
-  attackController: {fileID: 2979723395943220326}
-  platform: {fileID: 0}
-  mecanim: {fileID: 7573527827155227431}
-  meshRenderer: {fileID: 0}
-  ani: {fileID: 3333436509305836838}
-  totalDieKeepTime: 1
-  showInjuryNum: 0
-  injuryNumText: {fileID: 6467251191553420251, guid: 9b37289f93ea76745ab2cefb79a93e3c, type: 3}
-  injuryNumTextSummon: {fileID: 6467251191553420251, guid: 71b4c570c9e403d429846b71878a20c4, type: 3}
-  injuryNumPos_summon: {x: 1, y: 3}
-  injuryNumRandom_summon: {x: 1, y: 1}
-  injuryNumPos_march: {x: 1, y: 3}
-  injuryNumRandom_march: {x: 1, y: 1}
-  dieKeepTime: 0
-  beHitDistance: 3
-  attackDis: 0
-  targetCharacter: {fileID: 0}
-  attackTarget: {fileID: 0}
-  state: 0
-  totalHp: 200
-  hp: 0
-  canFly: 0
-  canControlFly: 0
-  nowCanFly: 0
-  canNotShotDown: 1
-  canNotAddForce: 0
-  canNotChangeHurt: 0
-  isDie: 0
-  isRevive: 0
-  invincibleTime: 0
-  statePre: {fileID: 4272231268506418309, guid: cf5ca93704f49c744b0d6cfc2cd25a01, type: 3}
-  ls: {fileID: 0}
-  isInSoulTower: 0
-  beLarger: 0
-  toLargeSize: 0
-  cookEffect: {fileID: 0}
-  Attack_summonShootCanTransmit: 0
-  debugAttackFrom: 0
-  hitResistance: 0
-  foot: {fileID: 5440846222604650418}
-  attributeStatus: {fileID: 0}
-  hitFeedbackSystem: {fileID: 0}
-  spineEvent: {fileID: 0}
-  extraRiseGravity: -28.8
-  extraFallGravity: -14.4
-  extraGroundGravity: -28.8
-  velocityAddition: 0
-  platformPosY: 0
-  platformRotZ: 0
-  RotLerpSpeed: 0.6
-  RotLerpTime: 0
-  matState: 1
-  spinee: {fileID: 0}
-  mesh: {fileID: 0}
-  mats: []
-  outlineMats:
-  - {fileID: 2100000, guid: a30e0c3d2b8bf4e43a76fc2d5b3884cd, type: 2}
-  outline1Mats:
-  - {fileID: 2100000, guid: 82f4327af6aa844459ee45d1f72de829, type: 2}
-  moveSpeed: 2
-  needToAdjustFlyHeight: 0
-  flyHeight: 0
-  maxFlyHeight: 0
-  minFlyHeight: 0
-  flyUpTime: 0
-  isAdjustHeight: 0
-  isDamageReduction: 0
-  reductionDegree: 0
-  reductionEffect: {fileID: 0}
-  effect: {fileID: 0}
-  soulPrefab: {fileID: 1723151111827507807, guid: e2b65aa482f2f1447a4074208d72b778, type: 3}
-  soulStartSpeed: 1
-  isInvisible: 0
-  invisibleTime: 0
-  haveTransmit: 0
-  transmitTime: 0
-  portalsController: {fileID: 0}
-  isSustainedInjury: 0
-  sustainedInjuryTime: 0
-  sustainedInjury_IntervalTime: 0
-  sustainedInjury_damage: 0
-  heavyDamage: 0
-  killer: {fileID: 0}
-  exp: 10
-  tag: 2
-  dieEffect: {fileID: 417478504669294145, guid: 2a4e7e280b9d19042ba0f57ae5edf736, type: 3}
-  name: 
-  baseSortingOrder: 2000
-  isBack: 0
-  jumpSpeed: 10
-  maxMoveSpeed: 2
-  minMoveSpeed: 1
-  runSpeed: 0
-  isBeBlownUp: 0
-  isBeReboundedX: 0
-  isBeReboundedY: 0
-  reboundXSpeed: 0
-  reboundYSpeed: 0
-  wallDamage: 0
-  type: -1
-  searchState: 0
-  attackRatio: 0
-  len: 0
-  dropSoulMax: 5
-  dropSoulMin: 3
-  dropProbability: 100
-  dropSoulAngle: 90
 --- !u!54 &5440846222648032765
 Rigidbody:
   m_ObjectHideFlags: 0
@@ -1032,8 +937,8 @@ Rigidbody:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 5440846222648032759}
   serializedVersion: 2
-  m_Mass: 6
-  m_Drag: 0
+  m_Mass: 5
+  m_Drag: 0.1
   m_AngularDrag: 0.05
   m_UseGravity: 1
   m_IsKinematic: 0
@@ -1066,6 +971,8 @@ MonoBehaviour:
       attackValue: 0
       damage: 0
       attackDir: {x: 0, y: 0, z: 0}
+      criticalChance: 0
+      lifesteal: 0
       effect: {fileID: 0}
       attackEffect: 01000000
       attackMethod_Type: 0
@@ -1078,10 +985,10 @@ MonoBehaviour:
         ControlOrder: 0
       blowUp:
         directionType: 1
-        dir: {x: -1, y: 1, z: 0}
+        dir: {x: 1, y: 1, z: 0}
         dirRandom: {x: 0.5, y: 0.5, z: 0}
         force: 110
-        time: 0
+        time: 1
         haveLandingDamage: 0
         landingDamageRate: 0
         ControlOrder: 0
@@ -1130,6 +1037,8 @@ MonoBehaviour:
       attackValue: 0
       damage: 0
       attackDir: {x: 0, y: 0, z: 0}
+      criticalChance: 0
+      lifesteal: 0
       effect: {fileID: 0}
       attackEffect: 01000000
       attackMethod_Type: 0
@@ -1142,7 +1051,7 @@ MonoBehaviour:
         ControlOrder: 0
       blowUp:
         directionType: 0
-        dir: {x: -1, y: 0.2, z: 0}
+        dir: {x: 1, y: 0.2, z: 0}
         dirRandom: {x: 0, y: 0, z: 0}
         force: 120
         time: 0
@@ -1194,6 +1103,8 @@ MonoBehaviour:
       attackValue: 0
       damage: 0
       attackDir: {x: 0, y: 0, z: 0}
+      criticalChance: 0
+      lifesteal: 0
       effect: {fileID: 0}
       attackEffect: 
       attackMethod_Type: 0
@@ -1277,6 +1188,7 @@ MonoBehaviour:
   nextEndKeyTime: 0
   curKeyNum: 0
   beTargetCharacter: []
+  lifesteal: 1
 --- !u!114 &389370483430162252
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -1289,9 +1201,124 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: afba7d42d667121478f13ae8620e61a2, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
+  rb: {fileID: 5440846222648032765}
+  bodyTrans: {fileID: 6459001683917408033}
+  beSearchTrigger: {fileID: 4259433079752244006}
+  searchTrigger: {fileID: 2932762729738363159}
+  bodyCollider: {fileID: 4543619153787591511}
+  uiHp: {fileID: 478072938412589135}
+  beHitTrigger: {fileID: 5215008785419704458}
   attackController: {fileID: 2979723395943220326}
-  attackTrigger: {fileID: 7494721769656590307}
-  attackEnemyTrigger: {fileID: 3394333386830084064}
+  platform: {fileID: 0}
+  mecanim: {fileID: 7573527827155227431}
+  meshRenderer: {fileID: 0}
+  ani: {fileID: 3333436509305836838}
+  totalDieKeepTime: 1
+  showInjuryNum: 0
+  injuryNumText: {fileID: 6467251191553420251, guid: 9b37289f93ea76745ab2cefb79a93e3c, type: 3}
+  injuryNumTextSummon: {fileID: 6467251191553420251, guid: 71b4c570c9e403d429846b71878a20c4, type: 3}
+  injuryNumPos_summon: {x: 1, y: 3}
+  injuryNumRandom_summon: {x: 1, y: 1}
+  injuryNumPos_march: {x: 1, y: 3}
+  injuryNumRandom_march: {x: 1, y: 1}
+  dieKeepTime: 0
+  beHitDistance: 3
+  attackDis: 0
+  targetCharacter: {fileID: 0}
+  attackTarget: {fileID: 0}
+  state: 0
+  totalHp: 200
+  hp: 0
+  regeneration: 0
+  regenerationTime: 0
+  canFly: 0
+  canControlFly: 0
+  nowCanFly: 0
+  canNotShotDown: 1
+  canNotAddForce: 0
+  canNotChangeHurt: 0
+  isDie: 0
+  isRevive: 0
+  invincibleTime: 0
+  statePre: {fileID: 4272231268506418309, guid: cf5ca93704f49c744b0d6cfc2cd25a01, type: 3}
+  ls: {fileID: 0}
+  isInSoulTower: 0
+  beLarger: 0
+  toLargeSize: 0
+  cookEffect: {fileID: 0}
+  Attack_summonShootCanTransmit: 0
+  debugAttackFrom: 0
+  hitResistance: 0
+  foot: {fileID: 5440846222604650418}
+  attributeStatus: {fileID: 0}
+  hitFeedbackSystem: {fileID: 0}
+  spineEvent: {fileID: 0}
+  extraRiseGravity: -28.8
+  extraFallGravity: -14.4
+  extraGroundGravity: -28.8
+  velocityAddition: 0
+  platformPosY: 0
+  platformRotZ: 0
+  RotLerpSpeed: 0.6
+  RotLerpTime: 0
+  matState: 1
+  spinee: {fileID: 0}
+  mesh: {fileID: 0}
+  mats: []
+  outlineMats: []
+  outline1Mats: []
+  moveSpeed: 2
+  needToAdjustFlyHeight: 0
+  flyHeight: 0
+  maxFlyHeight: 0
+  minFlyHeight: 0
+  flyUpTime: 0
+  isAdjustHeight: 0
+  isDamageReduction: 0
+  reductionDegree: 0
+  reductionEffect: {fileID: 0}
+  effect: {fileID: 0}
+  soulPrefab: {fileID: 1723151111827507807, guid: e2b65aa482f2f1447a4074208d72b778, type: 3}
+  soulStartSpeed: 1
+  isInvisible: 0
+  invisibleTime: 0
+  haveTransmit: 0
+  transmitTime: 0
+  portalsController: {fileID: 0}
+  isSustainedInjury: 0
+  sustainedInjuryTime: 0
+  sustainedInjury_IntervalTime: 0
+  sustainedInjury_damage: 0
+  heavyDamage: 0
+  killer: {fileID: 0}
+  exp: 10
+  tag: 2
+  dieEffect: {fileID: 417478504669294145, guid: 2a4e7e280b9d19042ba0f57ae5edf736, type: 3}
+  name: 
+  baseSortingOrder: 2000
+  isBack: 0
+  jumpSpeed: 10
+  maxMoveSpeed: 2
+  minMoveSpeed: 1
+  runSpeed: 0
+  isBeBlownUp: 0
+  isBeReboundedX: 0
+  isBeReboundedY: 0
+  reboundXSpeed: 0
+  reboundYSpeed: 0
+  wallDamage: 0
+  type: 0
+  searchState: 0
+  attackRatio: 0
+  len: 0
+  dropSoulMax: 5
+  dropSoulMin: 3
+  dropProbability: 100
+  dropSoulAngle: 90
+  hitTime: 1
+  curHitTime: 0
+  attackTrigger0: {fileID: 7494721769656590307}
+  attackEnemyTrigger0: {fileID: 3394333386830084064}
   initialTargetTypes: 
   stone: {fileID: 2353298311948367420}
   smallStone: Enemy_SmallRockRoller
@@ -1302,8 +1329,15 @@ MonoBehaviour:
   deathTimer: 0
   isDying: 0
   isFalled: 0
-  owner: {fileID: 3719607727864895532}
-  isBig: 1
+  owner: {fileID: 389370483430162252}
+  isGather: 0
+  gatherTime: 1
+  gatherTimer: 0
+  isWeak: 0
+  weakTime: 1
+  weakTimer: 0
+  addForce: 1
+  isBig: 0
 --- !u!1 &6139679835290116115
 GameObject:
   m_ObjectHideFlags: 0

+ 130 - 138
ActionTowerDefense/Assets/Resources/Prefab/Enemy/Enemy_SmallRockRoller.prefab

@@ -169,6 +169,8 @@ MonoBehaviour:
   repelValue: 0
   offsetY: 1
   hitRate: 1
+  fatName: "\u76FE\u7532\u5175"
+  elasticity: 0.8
 --- !u!1 &2460330936527559963
 GameObject:
   m_ObjectHideFlags: 0
@@ -229,7 +231,7 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: 8b2c8973c65adf4448805aa906f6ad29, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
-  owner: {fileID: 3719607727864895532}
+  owner: {fileID: 0}
   attackerID: 0
   curX: 0
   mats: []
@@ -448,9 +450,9 @@ Transform:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 3168192831983976468}
   m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
-  m_LocalPosition: {x: 0, y: 1.5, z: 0}
-  m_LocalScale: {x: 1, y: 1, z: 1}
-  m_ConstrainProportionsScale: 0
+  m_LocalPosition: {x: 0, y: 0.9, z: 0}
+  m_LocalScale: {x: 0.6, y: 0.6, z: 0.6}
+  m_ConstrainProportionsScale: 1
   m_Children: []
   m_Father: {fileID: 5440846222648032754}
   m_RootOrder: 0
@@ -643,6 +645,8 @@ MonoBehaviour:
   repelValue: 0
   offsetY: 1
   hitRate: 1
+  fatName: "\u76FE\u7532\u5175"
+  elasticity: 0.8
 --- !u!1 &4480734502875862885
 GameObject:
   m_ObjectHideFlags: 0
@@ -877,7 +881,6 @@ GameObject:
   serializedVersion: 6
   m_Component:
   - component: {fileID: 5440846222648032754}
-  - component: {fileID: 3719607727864895532}
   - component: {fileID: 5440846222648032765}
   - component: {fileID: 2979723395943220326}
   - component: {fileID: 389370483430162252}
@@ -907,134 +910,6 @@ Transform:
   m_Father: {fileID: 0}
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
---- !u!114 &3719607727864895532
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 5440846222648032759}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: 7475a7d33f657b146a4994b1e02710ad, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 
-  rb: {fileID: 5440846222648032765}
-  bodyTrans: {fileID: 6459001683917408033}
-  beSearchTrigger: {fileID: 4259433079752244006}
-  searchTrigger: {fileID: 2932762729738363159}
-  bodyCollider: {fileID: 4543619153787591511}
-  uiHp: {fileID: 478072938412589135}
-  beHitTrigger: {fileID: 3377671071202039733}
-  attackController: {fileID: 2979723395943220326}
-  platform: {fileID: 0}
-  mecanim: {fileID: 7573527827155227431}
-  meshRenderer: {fileID: 0}
-  ani: {fileID: 3333436509305836838}
-  totalDieKeepTime: 1
-  showInjuryNum: 0
-  injuryNumText: {fileID: 6467251191553420251, guid: 9b37289f93ea76745ab2cefb79a93e3c, type: 3}
-  injuryNumTextSummon: {fileID: 6467251191553420251, guid: 71b4c570c9e403d429846b71878a20c4, type: 3}
-  injuryNumPos_summon: {x: 1, y: 3}
-  injuryNumRandom_summon: {x: 1, y: 1}
-  injuryNumPos_march: {x: 1, y: 3}
-  injuryNumRandom_march: {x: 1, y: 1}
-  dieKeepTime: 0
-  beHitDistance: 3
-  attackDis: 0
-  targetCharacter: {fileID: 0}
-  attackTarget: {fileID: 0}
-  state: 0
-  totalHp: 200
-  hp: 0
-  regeneration: 0
-  regenerationTime: 0
-  canFly: 0
-  canControlFly: 0
-  nowCanFly: 0
-  canNotShotDown: 1
-  canNotAddForce: 0
-  canNotChangeHurt: 0
-  isDie: 0
-  isRevive: 0
-  invincibleTime: 0
-  statePre: {fileID: 4272231268506418309, guid: cf5ca93704f49c744b0d6cfc2cd25a01, type: 3}
-  ls: {fileID: 0}
-  isInSoulTower: 0
-  beLarger: 0
-  toLargeSize: 0
-  cookEffect: {fileID: 0}
-  Attack_summonShootCanTransmit: 0
-  debugAttackFrom: 0
-  hitResistance: 0
-  foot: {fileID: 5440846222604650418}
-  attributeStatus: {fileID: 0}
-  hitFeedbackSystem: {fileID: 0}
-  spineEvent: {fileID: 0}
-  extraRiseGravity: -28.8
-  extraFallGravity: -14.4
-  extraGroundGravity: -28.8
-  velocityAddition: 0
-  platformPosY: 0
-  platformRotZ: 0
-  RotLerpSpeed: 0.6
-  RotLerpTime: 0
-  matState: 1
-  spinee: {fileID: 0}
-  mesh: {fileID: 0}
-  mats: []
-  outlineMats:
-  - {fileID: 2100000, guid: a30e0c3d2b8bf4e43a76fc2d5b3884cd, type: 2}
-  outline1Mats:
-  - {fileID: 2100000, guid: 82f4327af6aa844459ee45d1f72de829, type: 2}
-  moveSpeed: 2
-  needToAdjustFlyHeight: 0
-  flyHeight: 0
-  maxFlyHeight: 0
-  minFlyHeight: 0
-  flyUpTime: 0
-  isAdjustHeight: 0
-  isDamageReduction: 0
-  reductionDegree: 0
-  reductionEffect: {fileID: 0}
-  effect: {fileID: 0}
-  soulPrefab: {fileID: 1723151111827507807, guid: e2b65aa482f2f1447a4074208d72b778, type: 3}
-  soulStartSpeed: 1
-  isInvisible: 0
-  invisibleTime: 0
-  haveTransmit: 0
-  transmitTime: 0
-  portalsController: {fileID: 0}
-  isSustainedInjury: 0
-  sustainedInjuryTime: 0
-  sustainedInjury_IntervalTime: 0
-  sustainedInjury_damage: 0
-  heavyDamage: 0
-  killer: {fileID: 0}
-  exp: 10
-  tag: 2
-  dieEffect: {fileID: 417478504669294145, guid: 2a4e7e280b9d19042ba0f57ae5edf736, type: 3}
-  name: 
-  baseSortingOrder: 2000
-  isBack: 0
-  jumpSpeed: 10
-  maxMoveSpeed: 2
-  minMoveSpeed: 1
-  runSpeed: 0
-  isBeBlownUp: 0
-  isBeReboundedX: 0
-  isBeReboundedY: 0
-  reboundXSpeed: 0
-  reboundYSpeed: 0
-  wallDamage: 0
-  type: -1
-  searchState: 0
-  attackRatio: 0
-  len: 0
-  dropSoulMax: 5
-  dropSoulMin: 3
-  dropProbability: 100
-  dropSoulAngle: 90
 --- !u!54 &5440846222648032765
 Rigidbody:
   m_ObjectHideFlags: 0
@@ -1091,7 +966,7 @@ MonoBehaviour:
         ControlOrder: 0
       blowUp:
         directionType: 1
-        dir: {x: -1, y: 1, z: 0}
+        dir: {x: 1, y: 1, z: 0}
         dirRandom: {x: 0.5, y: 0.5, z: 0}
         force: 110
         time: 0
@@ -1157,7 +1032,7 @@ MonoBehaviour:
         ControlOrder: 0
       blowUp:
         directionType: 0
-        dir: {x: -1, y: 0.2, z: 0}
+        dir: {x: 1, y: 0.2, z: 0}
         dirRandom: {x: 0, y: 0, z: 0}
         force: 90
         time: 0
@@ -1307,9 +1182,122 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: afba7d42d667121478f13ae8620e61a2, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
+  rb: {fileID: 0}
+  bodyTrans: {fileID: 0}
+  beSearchTrigger: {fileID: 0}
+  searchTrigger: {fileID: 0}
+  bodyCollider: {fileID: 0}
+  uiHp: {fileID: 0}
+  beHitTrigger: {fileID: 0}
   attackController: {fileID: 2979723395943220326}
-  attackTrigger: {fileID: 7494721769656590307}
-  attackEnemyTrigger: {fileID: 3394333386830084064}
+  platform: {fileID: 0}
+  mecanim: {fileID: 0}
+  meshRenderer: {fileID: 0}
+  ani: {fileID: 0}
+  totalDieKeepTime: 2
+  showInjuryNum: 0
+  injuryNumText: {fileID: 0}
+  injuryNumTextSummon: {fileID: 0}
+  injuryNumPos_summon: {x: 0, y: 1}
+  injuryNumRandom_summon: {x: 1, y: 1}
+  injuryNumPos_march: {x: 0, y: 1}
+  injuryNumRandom_march: {x: 2, y: 2}
+  dieKeepTime: 0
+  beHitDistance: 0
+  attackDis: 0
+  targetCharacter: {fileID: 0}
+  attackTarget: {fileID: 0}
+  state: 0
+  totalHp: 100
+  hp: 0
+  regeneration: 0
+  regenerationTime: 0
+  canFly: 0
+  canControlFly: 0
+  nowCanFly: 0
+  canNotShotDown: 1
+  canNotAddForce: 0
+  canNotChangeHurt: 0
+  isDie: 0
+  isRevive: 0
+  invincibleTime: 0
+  statePre: {fileID: 0}
+  ls: {fileID: 0}
+  isInSoulTower: 0
+  beLarger: 0
+  toLargeSize: 0
+  cookEffect: {fileID: 0}
+  Attack_summonShootCanTransmit: 0
+  debugAttackFrom: 0
+  hitResistance: 0
+  foot: {fileID: 0}
+  attributeStatus: {fileID: 0}
+  hitFeedbackSystem: {fileID: 0}
+  spineEvent: {fileID: 0}
+  extraRiseGravity: -28.8
+  extraFallGravity: -14.4
+  extraGroundGravity: -28.8
+  velocityAddition: 0
+  platformPosY: 0
+  platformRotZ: 0
+  RotLerpSpeed: 0.6
+  RotLerpTime: 0
+  matState: 1
+  spinee: {fileID: 0}
+  mesh: {fileID: 0}
+  mats: []
+  outlineMats: []
+  outline1Mats: []
+  moveSpeed: 5
+  needToAdjustFlyHeight: 0
+  flyHeight: 0
+  maxFlyHeight: 0
+  minFlyHeight: 0
+  flyUpTime: 0
+  isAdjustHeight: 0
+  isDamageReduction: 0
+  reductionDegree: 0
+  reductionEffect: {fileID: 0}
+  effect: {fileID: 0}
+  soulPrefab: {fileID: 0}
+  soulStartSpeed: 1
+  isInvisible: 0
+  invisibleTime: 0
+  haveTransmit: 0
+  transmitTime: 0
+  portalsController: {fileID: 0}
+  isSustainedInjury: 0
+  sustainedInjuryTime: 0
+  sustainedInjury_IntervalTime: 0
+  sustainedInjury_damage: 0
+  heavyDamage: 0
+  killer: {fileID: 0}
+  exp: 0
+  tag: 0
+  dieEffect: {fileID: 0}
+  name: 
+  baseSortingOrder: 0
+  isBack: 0
+  jumpSpeed: 10
+  maxMoveSpeed: 0
+  minMoveSpeed: 0
+  runSpeed: 0
+  isBeBlownUp: 0
+  isBeReboundedX: 0
+  isBeReboundedY: 0
+  reboundXSpeed: 0
+  reboundYSpeed: 0
+  wallDamage: 0
+  type: 0
+  searchState: 0
+  attackRatio: 0
+  len: 0
+  dropSoulMax: 3
+  dropSoulMin: 1
+  dropProbability: 100
+  dropSoulAngle: 60
+  attackTrigger0: {fileID: 0}
+  attackEnemyTrigger0: {fileID: 0}
   initialTargetTypes: 
   stone: {fileID: 3168192831983976468}
   smallStone: Enemy_RockRoller
@@ -1320,7 +1308,11 @@ MonoBehaviour:
   deathTimer: 0
   isDying: 0
   isFalled: 0
-  owner: {fileID: 3719607727864895532}
+  owner: {fileID: 0}
+  isGather: 0
+  gatherTime: 1
+  gatherTimer: 0
+  addForce: 0.5
   isBig: 0
 --- !u!1 &6139679835290116115
 GameObject:

+ 1 - 2
ActionTowerDefense/Assets/Scripts/Characters/BeHitTrigger.cs

@@ -40,10 +40,9 @@ public class BeHitTrigger : MonoBehaviour
         owner.BeHit(damage);
     }
 
-    public void BeHit(AttackController.AttackMethod attackMethod, Character attackFrom)
+    public virtual void BeHit(AttackController.AttackMethod attackMethod, Character attackFrom)
     {
         owner.BeHit(attackMethod,attackFrom);
-        //Debug.Log(attackInfo.damage + "" + attackFrom.name);
     }
 
     public void JudgeTurnWhite(bool isDemSummon, Character owner)

+ 120 - 3
ActionTowerDefense/Assets/Scripts/Skills/Rock/RockAttackTrigger.cs

@@ -4,19 +4,136 @@ using UnityEngine;
 
 public class RockAttackTrigger : AttackTrigger
 {
+    public string fatName = "¶Ü¼×±ø";
+    public GameObject rockRoller;
+    public Vector3 impactRockForcDriction = new Vector3(-1, 0.2f, 0);
+    public Vector3 impactRockHitedForcDriction = new Vector3(-1, 0.2f, 0);
+    public Vector3 impactFatForcDriction = new Vector3(1, 0.2f, 0);
+    public float fatForceMul = 100f;
+    public float rockForceMul = 100f;
+    public float collisionStopDuration = 0.2f;
+    public float curStopTime = 0f;
+    public List<BeHitTrigger> attcakFat;
+
+
     protected override void OnTriggerEnter(Collider other)
     {
         BeHitTrigger hitTrigger = other.GetComponent<BeHitTrigger>();
         if (hitTrigger)
         {
-            if (hitTrigger.owner.transform.gameObject.GetComponent<RockRoller>() || trigedObjs.Contains(hitTrigger))
+            if (hitTrigger.owner.transform.gameObject.GetComponent<RockRoller>())
             {
                 return;
             }
-            else
+            if (hitTrigger.owner.transform.gameObject.GetComponent<Demonic>())
+            {
+                if (hitTrigger.owner.transform.gameObject.GetComponent<Demonic>().myName == fatName)
+                {
+                    attcakFat.Add(hitTrigger);
+                    //if (hitTrigger.owner.transform.gameObject.GetComponent<Demonic>().state == CharacterState.Attack)
+                    //{
+                    //    if (hitTrigger.owner.transform.gameObject.GetComponentInChildren<AttackTrigger>())
+                    //    {
+                    //        if (hitTrigger.owner.transform.gameObject.GetComponentInChildren<AttackTrigger>().attackMethod.attackInfo != null)
+                    //        {
+                    //            if (hitTrigger.owner.transform.gameObject.GetComponentInChildren<AttackTrigger>().attackMethod.attackInfo.attackMethod_Type == AttackMethod_Type.Attack_Summon)
+                    //            {
+                    //                base.OnTriggerEnter(other);
+                    //            }
+                    //            else
+                    //            {
+                    //                attcakFat.Add(hitTrigger);
+                    //            }
+                    //            return;
+                    //        }
+                    //    }
+                    //}
+                    //else
+                    //{
+                    //    attcakFat.Add(hitTrigger);
+                    //    return;
+                    //}
+                }
+            }
+            base.OnTriggerEnter(other);
+        }
+    }
+    private void OnTriggerStay(Collider other)
+    {
+        BeHitTrigger hitTrigger = other.GetComponent<BeHitTrigger>();
+        if (attcakFat.Contains(hitTrigger))
+        {
+            return;
+        }
+        if (!hitTrigger)
+        {
+            return;
+        }
+        if (hitTrigger.owner.transform.gameObject.GetComponent<Demonic>())
+        {
+            if (hitTrigger.owner.transform.gameObject.GetComponent<Demonic>().myName == fatName)
+            {
+                attcakFat.Add(hitTrigger);
+            }
+        }
+    }
+    public void Update()
+    {
+        if (curStopTime < collisionStopDuration)
+        {
+            curStopTime += Time.deltaTime;
+            attcakFat.Clear();
+        }
+        if (attcakFat.Count > 0 && curStopTime > collisionStopDuration)
+        {
+            foreach (BeHitTrigger hitTrigger in attcakFat)
             {
-                base.OnTriggerEnter(other);
+                GameObject fat = hitTrigger.owner.transform.gameObject;
+                Demonic fatD = hitTrigger.owner.transform.gameObject.GetComponent<Demonic>();
+                AttackTrigger at = hitTrigger.owner.transform.gameObject.GetComponentInChildren<RockAttackTrigger>();
+                if (fatD.state != CharacterState.Attack)
+                {
+                    HandleBothCollision(rockRoller, fat);
+                    attcakFat.Clear();
+                    curStopTime = 0f;
+                    break;
+                }
+                if (at)
+                {
+                    if (at.attackMethod.attackInfo != null)
+                    {
+                        if (at.attackMethod.attackInfo.attackMethod_Type != AttackMethod_Type.Attack_Summon)
+                        {
+                            HandleBothCollision(rockRoller, fat);
+                            attcakFat.Clear();
+                            curStopTime = 0f;
+                            break;
+                        }
+                    }
+                }
             }
+            
+        }
+
+    }
+    private void HandleBothCollision(GameObject rockRoller,GameObject fat)
+    {
+        Rigidbody rockRb = rockRoller.GetComponentInParent<Rigidbody>();
+        RockRoller Roller = rockRoller.GetComponentInParent<RockRoller>();
+
+        Rigidbody fatRb = fat.GetComponent<Rigidbody>();
+        Demonic fater = fat.GetComponent<Demonic>();
+
+        Debug.Log(rockRb);
+        if (rockRb == null)
+        {
+            return;
         }
+        Roller.ChangeState(CharacterState.Fall);
+        fater.GetComponentInChildren<AttributeStatus>().isFly = false;
+        fater.GetComponentInChildren<AttributeStatus>().hitState = 0;
+        fater.ChangeState(CharacterState.SpecialStatus_BlowUp);
+        fatRb.AddForce(impactFatForcDriction * fatForceMul, ForceMode.Impulse);
+        rockRb.AddForce(impactRockForcDriction * rockForceMul, ForceMode.Impulse);
     }
 }

+ 36 - 0
ActionTowerDefense/Assets/Scripts/Skills/Rock/RockBehitTrigger.cs

@@ -0,0 +1,36 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+public class RockBehitTrigger : BeHitTrigger
+{
+    public int attackTime = 2;
+    public int curAttackTime = 0;
+    public string fatName = "¶Ü¼×±ø";
+    public override void BeHit(AttackController.AttackMethod attackMethod, Character attackFrom)
+    {
+
+        if (attackFrom.gameObject.GetComponent<Demonic>() != null)
+        {
+            if (attackFrom.gameObject.GetComponent<Demonic>().myName == fatName)
+            {
+                if (curAttackTime == attackTime - 1)
+                {
+                    owner.BeHit(attackMethod, attackFrom);
+                    curAttackTime = 0;
+                }
+                else
+                {
+                    curAttackTime += 1;
+                }
+            }
+        }
+        else
+        {
+            base.BeHit(attackMethod, attackFrom);
+        }
+
+    }
+
+
+}

+ 11 - 0
ActionTowerDefense/Assets/Scripts/Skills/Rock/RockBehitTrigger.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 469242c748dbd5f4086a9a11e1df3d2a
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 357 - 66
ActionTowerDefense/Assets/Scripts/Skills/Rock/RockRoller.cs

@@ -3,12 +3,14 @@ using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
 using cfg;
+using TMPro;
 
-public class RockRoller : MonoBehaviour
+public class RockRoller : Enemy
 {
-    public AttackController attackController;
-    public AttackTrigger attackTrigger;
-    public AttackTrigger attackEnemyTrigger;
+    public int hitTime = 1;
+    public int curHitTime = 0;
+    public RockAttackTrigger attackTrigger0;
+    public AttackTrigger attackEnemyTrigger0;
     public List<TargetType> initialTargetTypes = new List<TargetType>();
 
     public GameObject stone;
@@ -16,32 +18,64 @@ public class RockRoller : MonoBehaviour
     public float baseRotateSpeed = 90f;
     public float rotateMul = 1f;
     public float rotateDirection = -1f;
-    private Rigidbody rb;
     public float dieTime = 0.1f;
     public float deathTimer = 0f;
     public bool isDying;
     public bool isFalled = false;
     public Enemy owner;
 
+    public bool isGather = false;
+    public float gatherTime = 1f;
+    public float gatherTimer = 0f;
+
+    public bool isWeak = false;
+    public float weakTime = 1f;
+    public float weakTimer = 0f;
+    public float addForce = 1f;
+
     public bool isBig;
     private string enemyStr;
 
+    public override void Init()
+    {
+        base.Init();
+    }
+
     private void Awake()
     {
-        if (attackTrigger.attackMethod.attackInfo.damage == 0 && attackEnemyTrigger.attackMethod.attackInfo.damage == 0)
-        {
-            attackTrigger.attackMethod = attackController.attackMethod_march[0];
+        base.Awake();
+        InitializeComponents();
+        InitializeAttackMethods();
+        InitializeTargetTypes();
+        InitializeStoneReference();
+    }
+
+    private void InitializeComponents()
+    {
+        TryGetComponent<Rigidbody>(out rb);
+    }
 
-            attackEnemyTrigger.attackMethod = attackController.attackMethod_summon[0];
+    private void InitializeAttackMethods()
+    {
+        if (attackTrigger0 != null && attackTrigger0.attackMethod.attackInfo.damage == 0 &&
+            attackEnemyTrigger0 != null && attackEnemyTrigger0.attackMethod.attackInfo.damage == 0)
+        {
+            attackTrigger0.attackMethod = attackController.attackMethod_march[0];
+            attackEnemyTrigger0.attackMethod = attackController.attackMethod_summon[0];
         }
-        rb = GetComponent<Rigidbody>();
+    }
 
+    private void InitializeTargetTypes()
+    {
         if (attackController != null && attackController.targetTypes != null)
         {
             initialTargetTypes.Clear();
             initialTargetTypes.AddRange(attackController.targetTypes);
         }
+    }
 
+    private void InitializeStoneReference()
+    {
         if (stone == null)
         {
             stone = gameObject;
@@ -49,20 +83,50 @@ public class RockRoller : MonoBehaviour
         enemyStr = $"Prefab/Enemy/{smallStone}";
     }
 
-    void OnEnable()
+    protected override void OnEnable()
     {
+        base.OnEnable();
+        ResetState();
+    }
+
+    private void ResetState()
+    {
+        hitFeedbackSystem.canBeHitStun = false;
+        hitFeedbackSystem.canFreeze = false;
         isDying = false;
         isFalled = false;
         deathTimer = 0f;
+        gatherTimer = 0f;
+        isGather = false;
+        weakTimer = 0f;
+        isWeak = false;
         rotateDirection = -1f;
-        attackEnemyTrigger.gameObject.SetActive(false);
-        attackTrigger.gameObject.SetActive(true);
+        curHitTime = 0;
+
+        if (attackEnemyTrigger0 != null)
+            attackEnemyTrigger0.gameObject.SetActive(false);
+        if (attackTrigger0 != null)
+            attackTrigger0.gameObject.SetActive(true);
+
+        ResetTargetTypes();
+    }
+
+    private void ResetTargetTypes()
+    {
         if (attackController != null && attackController.targetTypes != null)
         {
             attackController.targetTypes.Clear();
             attackController.targetTypes.AddRange(initialTargetTypes);
         }
+    }
 
+    public void Update()
+    {
+        UpdateHitFeedback();
+        if (owner == null) return;
+
+        HandleOwnerSpecialState();
+        Rotate();
     }
 
     public void Rotate()
@@ -77,35 +141,48 @@ public class RockRoller : MonoBehaviour
         }
 
         stone.transform.Rotate(Vector3.forward, rotateDirection * currentSpeed * Time.deltaTime);
-        //Debug.Log(currentSpeed);
     }
 
-    void Update()
+
+    private void UpdateHitFeedback()
     {
-        if (owner == null) return;
+        hitFeedbackSystem.canBeHitStun = false;
+        hitFeedbackSystem.canFreeze = false;
+    }
 
+    private void HandleOwnerSpecialState()
+    {
         if (owner.state == CharacterState.SpecialStatus_BlowUp)
         {
-            rotateDirection = 1f;
-            if (attackTrigger != null)
-                attackTrigger.gameObject.SetActive(false);
+            if (attackTrigger0 != null)
+                attackTrigger0.gameObject.SetActive(false);
 
-            if (attackController != null)
-            {
-                attackController.targetTypes.Clear();
-                attackController.targetTypes.Add(TargetType.Enemy);
-                attackController.targetTypes.Add(TargetType.EnemyTower);
-            }
+            UpdateTargetTypesForAttack();
         }
+    }
 
-        if (owner.state == CharacterState.SpecialStatus_BlowUp && owner.attributeStatus.hitState == 1 && !isDying)
+    private void UpdateTargetTypesForAttack()
+    {
+        if (attackController != null)
         {
-            if (attackEnemyTrigger != null)
-                attackEnemyTrigger.gameObject.SetActive(true);
+            attackController.targetTypes.Clear();
+            attackController.targetTypes.Add(TargetType.Enemy);
+            attackController.targetTypes.Add(TargetType.EnemyTower);
+        }
+    }
 
-            isDying = true;
-            isFalled = true;
-            deathTimer = 0f;
+    public override void FixedUpdate()
+    {
+        OnState();
+        HandleDyingState();
+    }
+
+    private void HandleDyingState()
+    {
+        if (owner != null && owner.state == CharacterState.SpecialStatus_BlowUp &&
+            owner.attributeStatus.hitState == 1 && !isDying)
+        {
+            StartDying();
         }
 
         if (isDying)
@@ -114,49 +191,263 @@ public class RockRoller : MonoBehaviour
 
             if (deathTimer >= dieTime)
             {
-                if (isBig & isFalled)
-                {
-                    attackEnemyTrigger.gameObject.SetActive(false);
-                    if (attackController != null && attackController.targetTypes != null)
-                    {
-                        attackController.targetTypes.Clear();
-                        attackController.targetTypes.AddRange(initialTargetTypes);
-                    }
-                    SingleEnemyConfig cfgEnemy = GameManager.instance.allCfgData.CfgEnemy.Get("小滚石怪");
-                    GameObject enemyObj = Util.Instantiate(enemyStr, transform.position - new Vector3(-1, 0, 0), active: true);
-                    RockRoller rock = enemyObj.GetComponent<RockRoller>();
-                    rock.attackTrigger.attackMethod.attackInfo.damage = cfgEnemy.AttackMarch[0];
-                    rock.attackEnemyTrigger.attackMethod.attackInfo.damage = cfgEnemy.AttackSummon;
-                    rock.owner.moveSpeed = Random.Range(cfgEnemy.MinMoveSpeed, cfgEnemy.MaxMoveSpeed);
-                    GameObject enemyObj1 = Util.Instantiate(enemyStr, transform.position - new Vector3(1, 0, 0), active: true);
-                    RockRoller rock0 = enemyObj1.GetComponent<RockRoller>();
-                    rock0.attackTrigger.attackMethod.attackInfo.damage = cfgEnemy.AttackMarch[0];
-                    rock0.attackEnemyTrigger.attackMethod.attackInfo.damage = cfgEnemy.AttackSummon;
-                    rock0.owner.moveSpeed = Random.Range(cfgEnemy.MinMoveSpeed, cfgEnemy.MaxMoveSpeed);
-
-                    isFalled = false;
-                }
-                if (owner != null)
-                {
-                    owner.gameObject.SetActive(false);
-                }
-                isDying = false;
+                HandleDeath();
             }
         }
-        Rotate();
     }
-    void OnDisable()
+
+    private void StartDying()
+    {
+        if (attackEnemyTrigger0 != null)
+            attackEnemyTrigger0.gameObject.SetActive(true);
+
+        isDying = true;
+        isFalled = true;
+        deathTimer = 0f;
+    }
+
+    private void HandleDeath()
     {
+        if (isBig && isFalled)
+        {
+            SpawnSmallStones();
+        }
+
+        if (owner != null && curHitTime >= hitTime)
+        {
+            owner.gameObject.SetActive(false);
+        }
+
         isDying = false;
+    }
+
+    private void SpawnSmallStones()
+    {
+        attackEnemyTrigger0.gameObject.SetActive(false);
+        ResetTargetTypes();
+
+        SingleEnemyConfig cfgEnemy = GameManager.instance.allCfgData.CfgEnemy.Get("小滚石怪");
+
+        // 生成第一个小石头
+        GameObject enemyObj = Util.Instantiate(enemyStr, transform.position - new Vector3(-1, 0, 0), active: true);
+        ConfigureSmallStone(enemyObj, cfgEnemy);
+
+        // 生成第二个小石头
+        GameObject enemyObj1 = Util.Instantiate(enemyStr, transform.position - new Vector3(1, 0, 0), active: true);
+        ConfigureSmallStone(enemyObj1, cfgEnemy);
+
         isFalled = false;
-        deathTimer = 0f;
+    }
+
+    private void ConfigureSmallStone(GameObject stoneObj, SingleEnemyConfig cfgEnemy)
+    {
+        RockRoller rock = stoneObj.GetComponent<RockRoller>();
+        if (rock != null)
+        {
+            rock.attackTrigger0.attackMethod.attackInfo.damage = cfgEnemy.AttackMarch[0];
+            rock.attackEnemyTrigger0.attackMethod.attackInfo.damage = cfgEnemy.AttackSummon;
+            rock.owner.moveSpeed = Random.Range(cfgEnemy.MinMoveSpeed, cfgEnemy.MaxMoveSpeed);
+        }
+    }
+
+    public override void ChangeState(CharacterState newState)
+    {
+        if (state == newState || newState == CharacterState.FramePause)
+        {
+            return;
+        }
+
+        ExitCurrentState();
+        EnterNewState(newState);
+    }
+
+    private void ExitCurrentState()
+    {
+        switch (state)
+        {
+            case CharacterState.Idle:
+                rb.velocity = Vector3.zero;
+                break;
+            case CharacterState.Die:
+                isDie = false;
+                break;
+        }
+    }
+
+    private void EnterNewState(CharacterState newState)
+    {
+        CharacterState oldState = state;
+        state = newState;
+
+        switch (newState)
+        {
+            case CharacterState.Idle:
+                EnterIdleState();
+                break;
+            case CharacterState.Rush:
+                EnterRushState();
+                break;
+            case CharacterState.Rise:
+                EnterRiseState();
+                break;
+            case CharacterState.Fall:
+                EnterFallState();
+                break;
+            case CharacterState.Die:
+                EnterDieState();
+                break;
+            case CharacterState.SpecialStatus_BlowUp:
+                EnterBlowUpState();
+                break;
+        }
+    }
+
+    private void EnterIdleState()
+    {
         rotateDirection = -1f;
-        attackEnemyTrigger.gameObject.SetActive(false);
-        attackTrigger.gameObject.SetActive(true);
-        if (attackController != null && attackController.targetTypes != null)
+        rb.velocity = Vector3.zero;
+        if (attackEnemyTrigger0 != null) attackEnemyTrigger0.gameObject.SetActive(false);
+        if (attackTrigger0 != null) attackTrigger0.gameObject.SetActive(false);
+    }
+
+    private void EnterRushState()
+    {
+        rb.velocity = Vector3.zero;
+        if (attackEnemyTrigger0 != null) attackEnemyTrigger0.gameObject.SetActive(false);
+        if (attackTrigger0 != null) attackTrigger0.gameObject.SetActive(true);
+    }
+
+    private void EnterRiseState()
+    {
+        isGather = true;
+        gatherTimer = 0f;
+    }
+
+    private void EnterFallState()
+    {
+        rotateDirection = 1f;
+        weakTimer = 0f;
+    }
+
+    private void EnterDieState()
+    {
+        isDie = true;
+        dieKeepTime = totalDieKeepTime;
+        if (GameManager.instance.gameType != GameType.GameEnd)
         {
-            attackController.targetTypes.Clear();
-            attackController.targetTypes.AddRange(initialTargetTypes);
+            DropSouls();
         }
     }
+
+    private void EnterBlowUpState()
+    {
+        rotateDirection = 1f;
+        curHitTime += 1;
+        isDying = false;
+        isFalled = true;
+        deathTimer = 0f;
+        if (owner != null) owner.attributeStatus.hitState = 0;
+    }
+
+    public override void OnState()
+    {
+        switch (state)
+        {
+            case CharacterState.Idle:
+                ChangeState(CharacterState.Rise);
+                break;
+            case CharacterState.Rise:
+                HandleRiseState();
+                break;
+            case CharacterState.Rush:
+                HandleRushState();
+                break;
+            case CharacterState.Fall:
+                HandleFallState();
+                break;
+            case CharacterState.SpecialStatus_BlowUp:
+                attributeStatus.SpecialStateEffect(SpecialState.BlownUp);
+                break;
+            case CharacterState.Die:
+                dieKeepTime -= Time.deltaTime;
+                if (dieKeepTime <= 0)
+                {
+                    if (killer != null && killer.GetComponent<Demonic>())
+                    {
+                        SoldierType st = killer.GetComponent<Demonic>().soldierType;
+                        SoldierEXP.expInstance.AddEXP(st, (int)(exp * LevelSelect.EXPRatio + 0.5f));
+                    }
+                    if (dieEffect)
+                    {
+                        PoolManager.Instantiate(dieEffect, transform.position);
+                    }
+                    GameManager gameManager = GameManager.instance;
+                    if (gameManager.gameType == GameType.GameEnd)
+                    {
+                        GameObject fx = PoolManager.Instantiate(gameManager.dropGoldFX);
+                        fx.transform.position = transform.position;
+                        GameObject injuryNum = PoolManager.Instantiate(gameManager.dropGoldText);
+                        injuryNum.transform.position = new Vector3(
+                            transform.position.x + injuryNumPos_march.x + Random.Range(-injuryNumRandom_march.x / 2f, injuryNumRandom_march.x / 2f),
+                            transform.position.y + injuryNumPos_march.y + Random.Range(-injuryNumRandom_march.y / 2f, injuryNumRandom_march.y / 2f),
+                            transform.position.z);
+                        TextMeshProUGUI text = injuryNum.GetComponentInChildren<TextMeshProUGUI>();
+                        text.text = $"+{gameManager.enemyGoldDrop}";
+                    }
+                    gameObject.SetActive(false);
+                    break;
+                }
+                break;
+                break;
+        }
+    }
+
+    private void HandleRiseState()
+    {
+        if (isGather && gatherTimer < gatherTime)
+        {
+            gatherTimer += Time.deltaTime;
+        }
+        else
+        {
+            Debug.Log("gatherFinsh");
+            isGather = false;
+            ChangeState(CharacterState.Rush);
+        }
+    }
+
+    private void HandleRushState()
+    {
+        Vector3 velocity = rb.velocity;
+        if (Mathf.Abs(velocity.x) < moveSpeed)
+        {
+            velocity.x += addForce;
+        }
+        rb.velocity = velocity;
+    }
+
+    private void HandleFallState()
+    {
+        if (!foot.TrigGround)
+        {
+            isWeak = true;
+        }
+
+        if (isWeak && weakTimer < weakTime && foot.TrigGround)
+        {
+            rb.velocity = Vector3.zero;
+            weakTimer += Time.deltaTime;
+        }
+        else if (weakTimer >= weakTime)
+        {
+            isWeak = false;
+            ChangeState(CharacterState.Idle);
+        }
+    }
+
+    public void OnDisable()
+    {
+        EnemyCreater.instance.OnEnemyRecycle(this);
+        ResetState();
+    }
 }

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