|
|
@@ -271,9 +271,13 @@ public class AttributeStatus : MonoBehaviour
|
|
|
break;
|
|
|
case 0:
|
|
|
Vector3 vel = rb.velocity;
|
|
|
- if (isFly && foot.TrigGround && vel.y <= 0.01f)
|
|
|
+ if (isFly && foot.TrigGround)
|
|
|
{
|
|
|
vel = Vector3.zero;
|
|
|
+ if (!foot.haveGravity)
|
|
|
+ {
|
|
|
+ transform.position = new Vector3(transform.position.x, character.platformPosY, transform.position.z);
|
|
|
+ }
|
|
|
character.ani.Play("weak", 0, 0);
|
|
|
hitState = 1;
|
|
|
if (haveLandingDamage)
|
|
|
@@ -295,11 +299,14 @@ public class AttributeStatus : MonoBehaviour
|
|
|
{
|
|
|
character.isAdjustHeight = 1;
|
|
|
character.nowCanFly = character.canFly;
|
|
|
+
|
|
|
OutSpecialState();
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
rb.velocity = Vector3.zero;
|
|
|
+ rb.useGravity = false;
|
|
|
+ character.transform.rotation = Quaternion.Euler(transform.rotation.eulerAngles.x, transform.rotation.eulerAngles.y,character.platformRotZ); ;
|
|
|
attributeTime -= Time.deltaTime;
|
|
|
}
|
|
|
break;
|
|
|
@@ -410,6 +417,7 @@ public class AttributeStatus : MonoBehaviour
|
|
|
rb.constraints = RigidbodyConstraints.FreezeRotation | RigidbodyConstraints.FreezePositionZ;
|
|
|
rb.velocity = Vector3.zero;
|
|
|
rb.AddForce(vec3 * blowUp.force * (1 - resistances.BlowUp), ForceMode.Impulse);
|
|
|
+ rb.transform.rotation = Quaternion.Euler(0, 0, 0);
|
|
|
haveLandingDamage = blowUp.haveLandingDamage;
|
|
|
landingDamage = blowUp.landingDamage;
|
|
|
hitState = 0;
|
|
|
@@ -440,6 +448,7 @@ public class AttributeStatus : MonoBehaviour
|
|
|
rb.constraints = RigidbodyConstraints.FreezeRotation | RigidbodyConstraints.FreezePositionZ;
|
|
|
rb.velocity = Vector3.zero;
|
|
|
rb.AddForce(vec3 * shotDown.force * (1 - resistances.ShotDown), ForceMode.Impulse);
|
|
|
+ rb.transform.rotation = Quaternion.Euler(0, 0, 0);
|
|
|
character.ani.Play("hitted", 0, 0);
|
|
|
haveLandingDamage = shotDown.haveLandingDamage;
|
|
|
landingDamage = shotDown.landingDamage;
|