|
@@ -15,6 +15,8 @@ public class HitFeedbackSystem : MonoBehaviour
|
|
|
private RigidbodyConstraints origRC;
|
|
private RigidbodyConstraints origRC;
|
|
|
private Vector3 velocity; //¶Ù֡ǰËÙ¶È
|
|
private Vector3 velocity; //¶Ù֡ǰËÙ¶È
|
|
|
[HideInInspector] public CharacterState curCharacterState; //¶Ù֡ǰ״̬
|
|
[HideInInspector] public CharacterState curCharacterState; //¶Ù֡ǰ״̬
|
|
|
|
|
+ [HideInInspector] public AttackInfo attackInfoData;
|
|
|
|
|
+ [HideInInspector] public Character attackFromData;
|
|
|
|
|
|
|
|
[TabGroup("½©Ö±")] [DisplayOnly] public float hitStunTime;
|
|
[TabGroup("½©Ö±")] [DisplayOnly] public float hitStunTime;
|
|
|
[HideInInspector] public bool canHitStun;
|
|
[HideInInspector] public bool canHitStun;
|
|
@@ -45,7 +47,7 @@ public class HitFeedbackSystem : MonoBehaviour
|
|
|
character.rb.velocity = velocity;
|
|
character.rb.velocity = velocity;
|
|
|
character.state = curCharacterState;
|
|
character.state = curCharacterState;
|
|
|
}
|
|
}
|
|
|
- attributeStatus.AddSpecialState();
|
|
|
|
|
|
|
+ attributeStatus.AddSpecialState(attackInfoData, attackFromData);
|
|
|
}
|
|
}
|
|
|
freezeFrame -= 1;
|
|
freezeFrame -= 1;
|
|
|
}
|
|
}
|
|
@@ -65,10 +67,12 @@ public class HitFeedbackSystem : MonoBehaviour
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//¶ÙÖ¡
|
|
//¶ÙÖ¡
|
|
|
- public void FreezeFrame()
|
|
|
|
|
|
|
+ public void FreezeFrame(AttackInfo attackInfo, Character attackFrom)
|
|
|
{
|
|
{
|
|
|
if (canFreeze)
|
|
if (canFreeze)
|
|
|
{
|
|
{
|
|
|
|
|
+ attackInfoData = attackInfo;
|
|
|
|
|
+ attackFromData = attackFrom;
|
|
|
canFreeze = false;
|
|
canFreeze = false;
|
|
|
if (!isFreeze)
|
|
if (!isFreeze)
|
|
|
{
|
|
{
|
|
@@ -83,17 +87,17 @@ public class HitFeedbackSystem : MonoBehaviour
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
|
- attributeStatus.AddSpecialState();
|
|
|
|
|
|
|
+ attributeStatus.AddSpecialState(attackInfo,attackFrom);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//½©Ö±
|
|
//½©Ö±
|
|
|
- public void EnterHitStun()
|
|
|
|
|
|
|
+ public void EnterHitStun(Character attackFrom)
|
|
|
{
|
|
{
|
|
|
if (canHitStun)
|
|
if (canHitStun)
|
|
|
{
|
|
{
|
|
|
canHitStun = false;
|
|
canHitStun = false;
|
|
|
- float dir1 = attributeStatus.attackFrom.transform.position.x <= character.transform.position.x? 1:-1;
|
|
|
|
|
|
|
+ float dir1 = attackFrom.transform.position.x <= character.transform.position.x? 1:-1;
|
|
|
float dir2 = character.bodyTrans.localScale.x >= 0? 1:-1;
|
|
float dir2 = character.bodyTrans.localScale.x >= 0? 1:-1;
|
|
|
if(dir1 == dir2)
|
|
if(dir1 == dir2)
|
|
|
{
|
|
{
|