Hello! i know this is probably a stupid question but i need help because i don’t know what i’m doing wrong, and i need to fix this error. Here’s my code
public class enemyAttack : MonoBehaviour {
public float time = 5f;
private IEnumerator coroutine;
public Image image;
public float t = 5f;
void Start () {
coroutine = nombredeCorutina (time);
StartCoroutine (coroutine);
image.gameObject.SetActive (false);
}
private IEnumerator nombredeCorutina (float t, Image im) {
im.gameObject.SetActive (true);
yield return new WaitForSeconds (t);
coroutine = nombredeCorutina (time);
StartCoroutine (coroutine);
}
}
Moved to the help room since it's a trivial logic error
– Bunny83