|
|
@@ -93,7 +93,16 @@ public class HitFeedbackSystem : MonoBehaviour
|
|
|
if (canHitStun)
|
|
|
{
|
|
|
canHitStun = false;
|
|
|
- character.ani.Play("hitted", 0, 0);
|
|
|
+ float dir1 = attributeStatus.attackFrom.transform.position.x <= character.transform.position.x? 1:-1;
|
|
|
+ float dir2 = character.bodyTrans.localScale.x >= 0? 1:-1;
|
|
|
+ if(dir1 == dir2)
|
|
|
+ {
|
|
|
+ character.ani.Play("hitted", 0, 0);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ character.ani.Play("hitted_back", 0, 0);
|
|
|
+ }
|
|
|
character.ChangeState(CharacterState.HitStun);
|
|
|
character.ChangeStateText(CharacterState.HitStun);
|
|
|
}
|