files arranged using assembly defn

This commit is contained in:
Mausham
2025-12-16 18:12:45 -08:00
parent 4f1a6365fe
commit 04b1e3127c
144 changed files with 1207 additions and 1425 deletions

View File

@@ -0,0 +1,46 @@
using Darkmatter.Core;
using UnityEngine;
using UnityEngine.SceneManagement;
using VContainer;
namespace Darkmatter.Presentation
{
public class PauseScreenController : IPauseScreenController
{
private PauseScreenView pauseScreenView;
[Inject] private IInputReader IinputReader;
[Inject] private IAudioController IaudioController;
[Inject] private IGameSession IgameSession;
public PauseScreenController(PauseScreenView _pauseScreenView)
{
pauseScreenView = _pauseScreenView;
pauseScreenView.resumeBtn.onClick.AddListener(OnResumeButtonClicked);
pauseScreenView.restartBtn.onClick.AddListener(OnRestartButtonClicked);
}
public void ShowPauseScreen()
{
pauseScreenView.Show();
}
private void OnRestartButtonClicked()
{
Time.timeScale = 1.0f;
IinputReader.UnlockInput();
IaudioController.PlayBtnPressedSound();
IgameSession.showStartScreen = false;
SceneManager.LoadScene(0); //Restart This Scene
}
private void OnResumeButtonClicked()
{
Time.timeScale = 1.0f;
pauseScreenView.Hide();
IinputReader.UnlockInput();
IaudioController.PlayBtnPressedSound();
}
}
}