Fixed button click state not resetting bug #398
|
@ -37,7 +37,7 @@ public class PauseMenu : Script
|
||||||
UIElement resume = resumeBtn.GetComponent<UIElement>();
|
UIElement resume = resumeBtn.GetComponent<UIElement>();
|
||||||
if (resume != null)
|
if (resume != null)
|
||||||
{
|
{
|
||||||
resume.OnClick.RegisterAction(() =>
|
resume.OnRelease.RegisterAction(() =>
|
||||||
{
|
{
|
||||||
if (GameManager.Instance.GamePause)
|
if (GameManager.Instance.GamePause)
|
||||||
{
|
{
|
||||||
|
@ -61,7 +61,7 @@ public class PauseMenu : Script
|
||||||
UIElement retry = retryBtn.GetComponent<UIElement>();
|
UIElement retry = retryBtn.GetComponent<UIElement>();
|
||||||
if (retry != null)
|
if (retry != null)
|
||||||
{
|
{
|
||||||
retry.OnClick.RegisterAction(() =>
|
retry.OnRelease.RegisterAction(() =>
|
||||||
{
|
{
|
||||||
Audio.StopAllSounds();
|
Audio.StopAllSounds();
|
||||||
SceneManager.RestartScene();
|
SceneManager.RestartScene();
|
||||||
|
@ -75,7 +75,7 @@ public class PauseMenu : Script
|
||||||
UIElement quit = quitBtn.GetComponent<UIElement>();
|
UIElement quit = quitBtn.GetComponent<UIElement>();
|
||||||
if (quit != null)
|
if (quit != null)
|
||||||
{
|
{
|
||||||
quit.OnClick.RegisterAction(() =>
|
quit.OnRelease.RegisterAction(() =>
|
||||||
{
|
{
|
||||||
Audio.StopAllSounds();
|
Audio.StopAllSounds();
|
||||||
//go to main menu
|
//go to main menu
|
||||||
|
|
Loading…
Reference in New Issue