Beispiel #1
0
 private void Start()
 {
     if (areCommandsInitialized)
     {
         return;
     }
     DebugScreenConsole.AddConsoleCommand(COMMAND, OnCommand, HELP);
     areCommandsInitialized = true;
 }
        // Start method, standard unity thingy
        public void Start()
        {
            Debug.Log("Starting to try to add terminal commands");
            // Add commands to the command dictionary
            simpitCommands.Add(simpitCommandCodes.HELP, new KerbalSimpitConsole_HelpCommand());
            simpitCommands.Add(simpitCommandCodes.SERIAL, new KerbalSimpitConsole_SerialCommand(this.k_simpit));


            // If the commands have already been initialised
            if (commandsInitialised)
            {
                return;
            }
            // Adds the command to the game
            DebugScreenConsole.AddConsoleCommand(SIMPIT_IDENTIFIER, OnCommand, SIMPIT_HELP);
            Debug.Log("Added Terminal Commands");
            // Sets the commands initialised flag
            commandsInitialised = true;

            String[] startArgument = new string[] { Localizer.GetStringByTag(commandLib.serialCommandTag(commandLib.SIM_SERIAL_COMMAND_START)) };
            //simpitCommands[simpitCommandCodes.SERIAL].simpitCommandCall(new commandArguments(simpitCommands[simpitCommandCodes.SERIAL],startArgument));
        }