27 lines
458 B
C#
27 lines
458 B
C#
using UnityEngine;
|
|
|
|
public class Vitals : MonoBehaviour
|
|
{
|
|
[SerializeField]
|
|
private float initHealth = 100;
|
|
|
|
private float health;
|
|
public float Health
|
|
{
|
|
get
|
|
{
|
|
return health;
|
|
}
|
|
set
|
|
{
|
|
health = value;
|
|
}
|
|
}
|
|
|
|
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
|
void Start()
|
|
{
|
|
health = initHealth;
|
|
}
|
|
}
|