Esempio n. 1
0
    // Sets up the debug panel, if needed, initialises a new game and offers the player the choice of seeing the instructions or not
    private void Update()
    {
        if (!gameStarted)
        {
            gameStarted = true;

            // Start the game in the selected mode
            switch (PlayerPrefs.GetString("CurrentMode"))
            {
            case "new":
                // Set up parameters for a new game
                NewGame();

                // Clear text view and show welcome message and instructions question
                textDisplayController.ResetTextDisplay();
                questionController.RequestQuestionResponse("instructions");
                break;

            case "continue":
                ResumeFromLoad(true);
                break;

            case "load":
                ResumeFromLoad(false);
                break;

            case "save":
                SaveGame();
                break;
            }
        }
    }