using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerInfo : MonoBehaviour { private int health; private int essence_basic; //Add elemental essences? private void Awake() { health = 5; essence_basic = 0; } public void AddHealth(int value) { health += value; if (health <= 0) { Debug.Log("NO HEALTH REMAINING"); } } public void AddEssenceBasic(int value) { if (essence_basic + value < 0) { Debug.LogError("NOT ENOUGH ESSENCE"); } else essence_basic += value; } }