コード例 #1
0
    public Room[] StoryRooms;           // Stores rooms for the story


    // Private variables
    //private bool _isInVN;
    //private bool _isInTA;



    #region public func


    /// <summary>
    /// Enters text adventure
    /// </summary>
    public void enterTA()
    {
        //_isInTA = true;
        //_isInVN = false;

        // Disable the VN stuff, enable TA stuff
        VN.SetActive(false);
        TA.SetActive(true);

        // Enter next room for dream world, ensure that it prints next room and everything
        _roomNav.currentRoom = StoryRooms[sleepTree.GetIntegerVariable("DayCount")];

        // Prints out tons of blank space
        _controller.LogStringWithReturn("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" +
                                        "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");

        // Prints new room text
        _controller.DisplayRoomText();
        _controller.DisplayLoggedText();

        // Reactivates the input field when enter/return is pressed
        _inputField.ActivateInputField();

        // Empties inputfield for the player
        _inputField.text = null;
    }
コード例 #2
0
    /// <summary>
    ///  When input is complete
    /// </summary>
    private void InputComplete()
    {
        // Displayes the text
        _controller.DisplayLoggedText();

        // Reactivates the input field when enter/return is pressed
        inputField.ActivateInputField();

        // Empties inputfield for the player
        inputField.text = null;
    }