My instantiated objects move up and user touch to destroy them. I want to count intantiated objects that passes a spesific point. (i want to count how many objects user missed ) So that when counting number reaches a detirmined number, the game will be over. Could please help, What 's wrong with my script.
public GameObject obj;
void Update()
{
for (int i = 0; i < obj.Length; i++)
{
if (obj*.transform.position.y> 4)*
{
countObj(1); //Counting object funtion
}
}
}