Files
2026-02-24 09:18:49 +03:00

16 lines
430 B
C#

using UnityEngine;
namespace Code.Gameplay.Character.Stats
{
public class HealthBuff : MonoBehaviour
{
[SerializeField] private int healthBuff = 50;
private void OnTriggerEnter(Collider other)
{
if (!other.CompareTag("Player")) return;
var health = other.GetComponent<HealthSystem>();
health?.Heal(healthBuff);
Destroy(gameObject);
}
}
}