input refactored

This commit is contained in:
Mausham
2025-12-15 21:51:34 +05:45
parent a166fe2861
commit 05287c4b73
10 changed files with 41 additions and 25 deletions

View File

@@ -12,6 +12,7 @@ public class DeathScreenController:IDeathScreenController
[Inject] private IInputReader IinputReader;
[Inject] private IAudioController IaudioController;
[Inject] private IGameSession IgameSession;
[Inject] private IGameScreenController IgameScreenController;
public DeathScreenController(DeathScreenView _deathScreenView)
{
deathScreenView = _deathScreenView;
@@ -21,6 +22,7 @@ public class DeathScreenController:IDeathScreenController
public void ShowDeathScreen()
{
IgameScreenController.HideGameScreen();
deathScreenView.Show(IscoreService.score,IscoreService.highScore);
}
@@ -38,6 +40,7 @@ public class DeathScreenController:IDeathScreenController
Debug.Log("Restart Button Clicked");
IinputReader.UnlockInput();
IaudioController.PlayBtnPressedSound();
IgameSession.showStartScreen = false;
SceneManager.LoadScene(0);
}
}