Ejemplo n.º 1
0
 public void PlayerInteraction()
 {
     if (triggerAction == Action.Open)
     {
         mover.Open();
     }
     else if (triggerAction == Action.Close)
     {
         mover.Close();
     }
 }
    private void checkSolution()
    {
        puzzleSolved = true;
        foreach (PuzzleButton puzzleButton in puzzleButtons)
        {
            if (puzzleButton.currSprite != spriteSolution)
            {
                puzzleSolved = false;
            }
        }

        if (puzzleSolved == true)
        {
            puzzleHasBeenSolvedOnce = true;
            OnPuzzleSolved();
        }
        else if (puzzleHasBeenSolvedOnce)
        {
            platform.Close();
            StartCoroutine(WaitPlatform());
        }
    }