Hi!

i already tried to public this question but it seems i made a mistake.

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.

150333-cubeexample.png

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?

List platformsHit;

void Start()
{
     platformsHit = new List<bool>();
}

// code here somewhere to change the bools for individual platforms

void CheckIfAllHit()
{
         int falseCount = 0;
         bool canFinish = false;
           foreach(bool platformHit in platformsHit)
       {
            if(platformHit == false)
            {
                    falseCount++;                          
             }
        }
           if(falseCount > 0)
            {
                canFinish = false;
            } else { canFinsish = true; }
}