Exemplo n.º 1
0
    public void SetupBoard()
    {
        // Fill the puzzle scene with the puzzle data.
        GameObject.FindGameObjectWithTag("PuzzlePrompt").GetComponent <TMPro.TextMeshProUGUI>().text = puzzleData.Description;
        GetComponent <CardGenerator>().GenerateHand(puzzleData);
        InputBox.GetComponent <InputBox>().InitializeInput(puzzleData.InputStream);
        OutputBox.GetComponent <OutputBox>().InitializeOutput(puzzleData.OutputStream);

        if (!playerState.ContainsPuzzleSave(this.puzzleName))
        {
            FirstVisit = true;
            playerState.AddPuzzleSave(this.puzzleName);
        }

        // Fill cached data.
        LoadCachedCards(playerState.GetCachedCards(this.puzzleName));
        LoadCachedInstructions(playerState.GetCachedSolution(this.puzzleName));
    }