|
|
@@ -44,6 +44,7 @@ public class AttributeStatus : MonoBehaviour
|
|
|
private float normalFallSpeed = 15f;
|
|
|
|
|
|
[TabGroup("샌령샌쭝")] [DisplayOnly] public int hitState;
|
|
|
+ [TabGroup("샌령샌쭝")] [DisplayOnly] public bool isFly;
|
|
|
[TabGroup("샌령샌쭝")] [LabelText("X렘蕨羸제")] public float decelerationRatioX = 2f;
|
|
|
[TabGroup("샌령샌쭝")] [LabelText("Y렘蕨羸제")] public float decelerationRatioY = 15f;
|
|
|
|
|
|
@@ -194,7 +195,7 @@ public class AttributeStatus : MonoBehaviour
|
|
|
{
|
|
|
case 0:
|
|
|
Vector3 vel = rb.velocity;
|
|
|
- if (foot.TrigGround && vel.y <= 0.01f)
|
|
|
+ if (isFly && foot.TrigGround && vel.y <= 0.01f)
|
|
|
{
|
|
|
vel = Vector3.zero;
|
|
|
character.ani.Play("weak", 0, 0);
|
|
|
@@ -204,6 +205,7 @@ public class AttributeStatus : MonoBehaviour
|
|
|
{
|
|
|
vel.x -= decelerationRatioX * Time.deltaTime;
|
|
|
vel.y -= decelerationRatioY * Time.deltaTime;
|
|
|
+ isFly = true;
|
|
|
}
|
|
|
rb.velocity = vel;
|
|
|
break;
|
|
|
@@ -293,7 +295,6 @@ public class AttributeStatus : MonoBehaviour
|
|
|
rotateDir = (1.5f - UnityEngine.Random.Range(1, 3)) * 2;
|
|
|
height = UnityEngine.Random.Range(floatState.height.x, floatState.height.y);
|
|
|
attributeTime = floatState.time * (1 - resistances.Float);
|
|
|
-
|
|
|
character.ChangeState(CharacterState.SpecialStatus_Float);
|
|
|
character.ChangeStateText(CharacterState.SpecialStatus_Float);
|
|
|
}
|
|
|
@@ -307,10 +308,12 @@ public class AttributeStatus : MonoBehaviour
|
|
|
{
|
|
|
vec3.x = -vec3.x;
|
|
|
}
|
|
|
+
|
|
|
rb.velocity = Vector3.zero;
|
|
|
rb.AddForce(vec3 * blowUp.force * (1 - resistances.BlowUp), ForceMode.Impulse);
|
|
|
character.ani.Play("hitted", 0, 0);
|
|
|
hitState = 0;
|
|
|
+ isFly = false;
|
|
|
character.ChangeState(CharacterState.SpecialStatus_BlowUp);
|
|
|
character.ChangeStateText(CharacterState.SpecialStatus_BlowUp);
|
|
|
}
|
|
|
@@ -330,6 +333,7 @@ public class AttributeStatus : MonoBehaviour
|
|
|
rb.AddForce(vec3 * shotDown.force * (1 - resistances.ShotDown), ForceMode.Impulse);
|
|
|
character.ani.Play("hitted", 0, 0);
|
|
|
hitState = 0;
|
|
|
+ isFly = false;
|
|
|
character.ChangeState(CharacterState.SpecialStatus_ShotDown);
|
|
|
character.ChangeStateText(CharacterState.SpecialStatus_ShotDown);
|
|
|
}
|