コード例 #1
0
    // Update is called once per frame
    void Update()
    {
        getInput();
        if (!isCliActivated && backtickInput)
        {
            isCliActivated = true;
            if (timeStopsWhenCLIActivated == true)   // since this option is checked, set time to stop
            {
                Command command = new Command("time.stop");
                gameInterpreter.enqueueCommand(command);
            }
            CommandLineInterface cli = CommandLineInterface.getInstance();
            cli.OpenCommandLine();

            // now turn off all controls for player movement controller
            PlayerMovementController playerMovementController;
        }
        else if (isCliActivated && backtickInput)
        {
            isCliActivated = false;
            CommandLineInterface cli = CommandLineInterface.getInstance();
            cli.CloseCommandLine();
            // resume game time
            Command command = new Command("time.resume");
            gameInterpreter.enqueueCommand(command);
        }
    }