- Home /
How to check if every plattform is visited?
Hi!
im very new in Unity and im working on a game based on a worldquest from WoW.
The Player (Cube) have to reach the Goal (Blue plattform) but he have to visit every other plattform exactly 1 time(which become green then). Its Game over when he walk over a plattform for the 2. time or when he touch the goal while there are still unvisited plattforms.
Now im looking for a way to check if all plattforms are visited to the time he hit the goal. But i have no clue how to do that.. My first Idea was to give every plattform an boolean visited who is initial false and then is set to true by hit. But how i check then if every of these booleans is true?
Answer by Hexer · Dec 23, 2019 at 03:32 PM
I suggest researching into how to create "Arrays". With Arrays you can do a "foreachloop" to check for each platform if your statement it true or false. https://docs.unity3d.com/ScriptReference/Array.html
Follow this Question
Related Questions
If a ball that you roll has a projector for shadows, how do you stop the rotation of the projector? 1 Answer
Unity iPhone Roll a Ball Tutorial. Joystick example? 1 Answer
Controllable ball rolling away by itself 2 Answers
Eliminate Roll effect in fps using keyboard 0 Answers
Will Goldstone turtorial; wall of cubes not normal, just exploding. 1 Answer