I have a basic FPS game where I have targets all over the level with the same tag so that I can use:
if (GameObject.FindWithTag(“Target”) == null) {
//Stop timer on GUI and print “All targets were destroyed, you win!”
// Press X to Quit or Spacebar to Restart
I’m fairly inexperienced with coding, so I don’t know how to start a timer on game start or make it update in real time on the GUI. I also don’t know how to implement the “Press X to Quit or Spacebar to Restart.” Neither on the GUI or the actual functions.
All other game mechanics are functional, so the targets destroy when shot twice etc.
If anyone has experience in this field who can help me script in C# your help would be most appreciated!