using UnityEngine; public class PlayerHealthUIController : MonoBehaviour { [SerializeField] private PlayerHealthView view; public void Bind(PlayerHealth _playerHealth) { _playerHealth.HealthChanged += OnHealthChanged; _playerHealth.PushCurrentHealthValue(); } public void OnHealthChanged(int _currentHealth, int _maxHealth) { view.UpdateHealth(_currentHealth, _maxHealth); } }