Exemplo n.º 1
0
    public IEnumerator NextBeam(TriggerdObjects beam)
    {
        yield return(new WaitForSeconds(time));

        beam.TriggerFunctionality();
        beamsLeft -= 1;
        if (beamsLeft == 0)
        {
            time = 0;
        }
    }
Exemplo n.º 2
0
 //checks if puzzle is complete/correct
 public void PuzzleCheck()
 {
     returnBool = true;
     foreach (bool b in finishedParts)
     {
         //if any are incorrect it turns the bool false
         if (b == false)
         {
             returnBool = false;
             break;
         }
     }
     //if the bool is false it triggers the trap otherwhise it send a message to the manager to then trigger a door to open
     if (returnBool == false)
     {
         trap.TriggerFunctionality();
     }
     print(returnBool);
     puzzleManager.done = returnBool;
 }