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

public class HealthScript : MonoBehaviour
{
    public int MaxHealth;
    float health;
    // Use this for initialization
    void Start()
    {
        health = MaxHealth;
    }

    // Update is called once per frame
    void Update()
    {
        if (health <= 0)
        {
            Destroy(this.gameObject);
        }
    }
    public float GetHealth()
    {
        return health;
    }
    public void TakeDamage(int _D)
    {
        health -= _D;
    }
    public void Heal(int _H)
    {
        health += _H;
    }
}
