using System;
using UnityEngine;
using UnityEngine.UI;

namespace Patterns_And_Principles.Patterns.The_Singleton_Pattern.MonoSingleton.Script
{
    public class TestScript : MonoBehaviour
    {
        [SerializeField]
        private Button _testButton;

        private void Awake()
        {
            _testButton.onClick.AddListener(OnTestButtonClick);
        }

        private void OnTestButtonClick()
        {
            TestGameManager.Instance.AddCoin(100);
            Debug.Log($"Current Coin: {TestGameManager.Instance.Coin}");
        }
    }
}