|
@@ -94,7 +94,6 @@ public class HitFeedbackSystem : MonoBehaviour
|
|
|
canFreeze = false;
|
|
canFreeze = false;
|
|
|
if (!isFreeze)
|
|
if (!isFreeze)
|
|
|
{
|
|
{
|
|
|
- HitFeedbackSystem hitFeedbackSystem = (attackFrom as MoveCharacter).hitFeedbackSystem;
|
|
|
|
|
origRC = character.rb.constraints;
|
|
origRC = character.rb.constraints;
|
|
|
velocity = character.rb.velocity;
|
|
velocity = character.rb.velocity;
|
|
|
curCharacterState = character.state;
|
|
curCharacterState = character.state;
|
|
@@ -102,16 +101,20 @@ public class HitFeedbackSystem : MonoBehaviour
|
|
|
character.rb.constraints = RigidbodyConstraints.FreezeAll;
|
|
character.rb.constraints = RigidbodyConstraints.FreezeAll;
|
|
|
character.ChangeState(CharacterState.FramePause);
|
|
character.ChangeState(CharacterState.FramePause);
|
|
|
isFreeze = true;
|
|
isFreeze = true;
|
|
|
- if (attackFromHasFreezeFrame && !hitFeedbackSystem.isFreeze)
|
|
|
|
|
|
|
+ if(attackFrom is MoveCharacter)
|
|
|
{
|
|
{
|
|
|
- hitFeedbackSystem.freezeFrame = freezeFrame;
|
|
|
|
|
- hitFeedbackSystem.origRC = attackFrom.rb.constraints;
|
|
|
|
|
- hitFeedbackSystem.velocity = attackFrom.rb.velocity;
|
|
|
|
|
- hitFeedbackSystem.curCharacterState = attackFrom.state;
|
|
|
|
|
- attackFrom.ani.speed = 0;
|
|
|
|
|
- attackFrom.rb.constraints = RigidbodyConstraints.FreezeAll;
|
|
|
|
|
- attackFrom.ChangeState(CharacterState.FramePause);
|
|
|
|
|
- hitFeedbackSystem.isFreeze = true;
|
|
|
|
|
|
|
+ HitFeedbackSystem hitFeedbackSystem = (attackFrom as MoveCharacter).hitFeedbackSystem;
|
|
|
|
|
+ if (attackFromHasFreezeFrame && !hitFeedbackSystem.isFreeze)
|
|
|
|
|
+ {
|
|
|
|
|
+ hitFeedbackSystem.freezeFrame = freezeFrame;
|
|
|
|
|
+ hitFeedbackSystem.origRC = attackFrom.rb.constraints;
|
|
|
|
|
+ hitFeedbackSystem.velocity = attackFrom.rb.velocity;
|
|
|
|
|
+ hitFeedbackSystem.curCharacterState = attackFrom.state;
|
|
|
|
|
+ attackFrom.ani.speed = 0;
|
|
|
|
|
+ attackFrom.rb.constraints = RigidbodyConstraints.FreezeAll;
|
|
|
|
|
+ attackFrom.ChangeState(CharacterState.FramePause);
|
|
|
|
|
+ hitFeedbackSystem.isFreeze = true;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|