using System;
using UnityEngine;

namespace Patterns_And_Principles.Patterns.The_Observer_Pattern.WithEvent.WithEvent.Script._02_RealWorldUsage.Subject
{
    public class CoinManager : MonoBehaviour
    {
        public static Action<int> CoinChanged;

        public void AddCoin(int amount)
        {
            CoinChanged?.Invoke(amount);
        }
    }
}