twinStick/twinStickCrawler/Assets/Scripts/Creatures/Vitals.cs

27 lines
458 B
C#
Raw Normal View History

2024-12-17 21:46:05 +00:00
using UnityEngine;
public class Vitals : MonoBehaviour
{
[SerializeField]
private float initHealth = 100;
2024-12-24 13:34:15 +00:00
private float health;
public float Health
{
get
{
return health;
}
set
{
health = value;
}
}
2024-12-17 21:46:05 +00:00
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
2024-12-24 13:34:15 +00:00
health = initHealth;
2024-12-17 21:46:05 +00:00
}
}