Esempio n. 1
0
 private void Start()
 {
     if (areCommandsInitialized)
     {
         return;
     }
     DebugScreenConsole.AddConsoleCommand(COMMAND, OnCommand, HELP);
     areCommandsInitialized = true;
 }
Esempio n. 2
0
    void Awake()
    {
        if (Instance != null)
        {
            Destroy(transform.root.gameObject);
            return;
        }
        else
        {
            DontDestroyOnLoad(transform.root.gameObject);
            Instance = this;
        }



        _ConsoleTextsMessage      = GameObject.Find("_ConsoleTextsMessage").GetComponent <Text>();
        _ConsoleTextsMessage.text = "<WILEz Debugging Console>\n";
    }
        // 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));
        }