using System;
using UnityEngine;
using UnityEngine.UI;

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

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

        private void OnTestButtonClick()
        {
            AdvancedSingleton.Instance.AddGem(100);
            Debug.Log($"AdvancedSingleton Gem : {AdvancedSingleton.Instance.Gem}");
        }
    }
}