How I can put time into my trigger function because my life is lowering too fast.
void OnTriggerStay(Collider other)
{
if (other.gameObject.name == "player")
{
if (GetComponent<Animation> ().Play ("attack02")) {
StartCoroutine (attack());
}
}
private IEnumerator attack(){
guiDisplay.live -= 1;
yield return new WaitForSeconds (2);
}
}