public override void Pause() { base.Pause(); // Freeze the movement, pause any animations. rbState = Rigidbody2DSaveState.CreateFrom(rigidbody); rigidbody.velocity = Vector2.zero; animator.enabled = false; }
public override void Pause() { base.Pause(); // Freeze the movement, pause any animations. rbState = Rigidbody2DSaveState.CreateFrom(rigidbody); rigidbody.velocity = Vector2.zero; animator.enabled = false; }