Working on a space shooter game. just added a pause window and if I click the mouse while paused and then hit escape to unpause the game or if I click the resume button the game will unpause but a single bullet is fired.
I have tried getting button Fire1 when unpausing and also Input.ResetInputAxes() but it still fires the single bullet. Any ideas of what I am doing wrong?
public void TogglePauseGame()
{
if (Time.timeScale > 0)
{
Time.timeScale = 0;
gameObject.active = true;
}
else
{
Input.ResetInputAxes();
gameObject.active = false;
Time.timeScale = 1;
}
}
Thanks,
-E