using UnityEngine;
using System.Collections;
using UnityEngine.UI;

public class HealthColor : MonoBehaviour
{

    public PlayerHealth health;
    public Image background;

    public void CheckHealth()
    {
        if (health.currentHP > 60)
        {
            background.color = Color.green;
        }
        else if (health.currentHP > 40)
        {
            background.color = Color.yellow;
        }
        else
        {
            background.color = Color.red;
        }
    }

}
