using UnityEngine;
using System.Collections;
using UnityEngine.UI; // incluir cuando programamos objetos en la interfaz.(UI)

public class enemy : MonoBehaviour {
    public int lifeEnemy;
    public GameObject lifeBarEnemy;

	// Use this for initialization
	void Start () {



	}
	
	// Update is called once per frame
	void Update () {
	
	}
    public void RestLifeBarEnemy()
    {

        lifeBarEnemy.GetComponent<Image>().fillAmount -= 0.2f;
    }
    public void PlayAudioEffect()
    {

        GetComponent<AudioSource>().Play();
    }
    
}
