I just want to be able to tap an object and have it delete.
When it deletes I want it to add to a variable.
If the variable equals a certain number then load next level or reload the current level.
I just want to be able to tap an object and have it delete.
When it deletes I want it to add to a variable.
If the variable equals a certain number then load next level or reload the current level.
I'm not going to write the script for you, but I will explain what you have to use.
When someone touches the screen, cast a ray from the position on the screen outward. Check if you hit a ball. If you did, call `Destroy(...)` with the hit object's game object as a parameter. In the same script, have a global variable defined called "Count" or something like that, and inside of `Update()`, check if "Count" is greater than a number, if it is, call `Application.LoadLevel(...)` with the next scene as your parameter.