using System;
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.SocialPlatforms.Impl;
using VContainer;

public class GameScreenController
{
    private GameScreenView gameScreenView;
    [Inject] private PauseScreenController pauseScreenController;

    public GameScreenController (GameScreenView gameScreenView)
    {
        this.gameScreenView = gameScreenView;
        this.gameScreenView.pauseBtn.onClick.AddListener(PauseBtnClicked);
    }

    public void ShowGameScreen()
    {
        gameScreenView.Show();
    }
    public void HideGameScreen()
    {
        gameScreenView.Hide();
    }

    private void PauseBtnClicked()
    {
        Time.timeScale = 0;
        pauseScreenController.ShowPauseScreen();
    }

    public void UpdateScore(int score)
    {
        gameScreenView.SetScore(score);
    }
    
}
