public void TakeDamage(float damage) { m_CurrentHealth -= damage; OnBaseHealthChanged?.Invoke(m_CurrentHealth); if (m_CurrentHealth <= 0.0f) { OnBaseDestroyed?.Invoke(); Debug.Log("Game Over"); } }
public void Init() { m_CurrentHealth = m_BaseHealth; OnBaseHealthChanged?.Invoke(m_BaseHealth); }