|
|
@@ -45,6 +45,7 @@ public class AttributeStatus : MonoBehaviour
|
|
|
[TabGroup("击飞击落")] [LabelText("Y方向阻力")] public float decelerationRatioY = 15f;
|
|
|
private bool haveLandingDamage;
|
|
|
private int landingDamage;
|
|
|
+ private Character landingDamageFrom;
|
|
|
|
|
|
[TabGroup("易伤")]
|
|
|
[DisplayOnly] public bool haveVulnerable;
|
|
|
@@ -171,10 +172,18 @@ public class AttributeStatus : MonoBehaviour
|
|
|
//击飞
|
|
|
case AttackEffect.BlowUp:
|
|
|
AddBlowUp(attackInfo.blowUp, attackFrom.bodyTrans);
|
|
|
+ if (attackInfo.blowUp.haveLandingDamage)
|
|
|
+ {
|
|
|
+ landingDamageFrom = attackFrom;
|
|
|
+ }
|
|
|
break;
|
|
|
//击落
|
|
|
case AttackEffect.ShotDown:
|
|
|
AddShotDown(attackInfo.shotDown, attackFrom.bodyTrans);
|
|
|
+ if (attackInfo.shotDown.haveLandingDamage)
|
|
|
+ {
|
|
|
+ landingDamageFrom = attackFrom;
|
|
|
+ }
|
|
|
break;
|
|
|
//击晕
|
|
|
case AttackEffect.Weak:
|
|
|
@@ -269,7 +278,7 @@ public class AttributeStatus : MonoBehaviour
|
|
|
hitState = 1;
|
|
|
if (haveLandingDamage)
|
|
|
{
|
|
|
- character.BeHit(landingDamage);
|
|
|
+ character.BeHit(landingDamage, landingDamageFrom);
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
@@ -402,7 +411,6 @@ public class AttributeStatus : MonoBehaviour
|
|
|
rb.AddForce(vec3 * blowUp.force * (1 - resistances.BlowUp), ForceMode.Impulse);
|
|
|
haveLandingDamage = blowUp.haveLandingDamage;
|
|
|
landingDamage = blowUp.landingDamage;
|
|
|
-
|
|
|
hitState = 0;
|
|
|
character.ani.Play("hitted", 0, 0);
|
|
|
isFly = false;
|