I am making flappy bird with this tutorial
And I did same thing in video .But my spawner is not spawn tubes
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Spawner : MonoBehaviour
{
public Birdy BirdScript;
public GameObject Tubes;
public float height;
public float Time;
private void Start()
{
StartCoroutine(SpawnObject());
}
public IEnumerator SpawnObject ()
{
while (BirdScript.isDead)
{
Instantiate(Tubes, new Vector3(3, Random.Range(-height, height), 0), Quaternion.identity);
yield return new WaitForSeconds (1f);
}
}
}
We don’t have any info about what BirdScript is, but I’m guessing you want to check if the bird is NOT dead rather than if it is dead. So it probably needs to be:
do them perfectly, to the letter (zero typos, including punctuation and capitalization)
stop and understand each step to understand what is going on.
If you go past anything that you don’t understand, then you’re just mimicking what you saw without actually learning, essentially wasting your own time. It’s only two steps. Don’t skip either step.