Пример #1
0
 public void SetPuzzle(SentencePuzzle puzzle)
 {
     sp            = puzzle;
     DataText.text = sp.DataSentence;
     DataText.gameObject.SetActive(false);
     SentenceText.text = sp.PartialSentence;
 }
Пример #2
0
    void AdvancePuzzles()
    {
        activePuzzle.PuzzleSolved = null;//clear event subscription;
        //clear the hand subscription;
        // and update the hand with the new puzzle


        puzzleNumber += 1;
        if (puzzleNumber >= Deck.Puzzles.Count)
        {
            player.SolvedPuzzle = null;
            if (LastPuzzle)
            {
                Exit.StartSlides();
            }
            else
            {
                LoadNextPuzzleDeck();//no endshow
            }
            SwitchState(InputState.SLIDE_STATE);
            return;
        }
        else
        {
            activePuzzle = Deck.Puzzles[puzzleNumber];
            activePuzzle.PuzzleSolved += AdvancePuzzles;
            SwitchState(InputState.PUZZLE_STATE);
            player.SetPuzzle(activePuzzle);
        }
    }
Пример #3
0
    //this is the actual thing that should have any Start() level behavior
    void OnEnable()
    {
        //Start the slide show for the intro
        Enter.StartSlides();
        Enter.EndShow += StartPuzzles;
        //Exit.EndShow += LoadNextPuzzleDeck;

        //Set the puzzle number to 0\
        puzzleNumber = 0;
        activePuzzle = Deck.Puzzles[puzzleNumber];
        activePuzzle.PuzzleSolved += AdvancePuzzles;

        //this is where we set up the Hand
        SetHandPuzzle();
        player.SolvedPuzzle += () => { handState = InputState.SOLVE_STATE; };//this is jank, but we use this to show the data text
        player.HandClearing += Deck.FlipUpCards;
        activePuzzle.ClearSelections();
    }