using System.Collections; using System.Collections.Generic; using UnityEngine; public class Consumable : MonoBehaviour { public int regenAmount; GameObject player; public void UseConsumable() { player = GameObject.FindWithTag("Player"); if (this.name.Contains("health")) { Debug.LogWarning("Health consumable used"); } if (this.name.Contains("essence")) { Debug.LogWarning("Essence consumable used"); } } }