Animation Pauses
This commit is contained in:
@@ -162,13 +162,19 @@ namespace Player
|
||||
public void Pause()
|
||||
{
|
||||
IsPaused = true;
|
||||
_playerRigidbody2D.simulated = !IsPaused;
|
||||
UpdateComponents();
|
||||
}
|
||||
|
||||
public void Resume()
|
||||
{
|
||||
IsPaused = false;
|
||||
UpdateComponents();
|
||||
}
|
||||
|
||||
private void UpdateComponents()
|
||||
{
|
||||
_playerRigidbody2D.simulated = !IsPaused;
|
||||
animator.enabled = !IsPaused;
|
||||
}
|
||||
|
||||
// MOVE METHODS
|
||||
|
Reference in New Issue
Block a user