Esempio n. 1
0
        private string DisplayCommandDetails(string commandName)
        {
            string formatting =
                @"<b>{0} Command</b>
            <b>Description:</b> {1}
            <b>Usage:</b> {2}";

            try
            {
                ConsoleCommand command = ConsoleCommandDatabase.GetCommand(commandName);
                return(string.Format(formatting, command.name, command.description, command.usage));
            }
            catch (NoSuchCommandException exception)
            {
                return(string.Format("Cannot find help information about {0}. Are you sure it is a valid command?", exception.command));
            }
        }
Esempio n. 2
0
        void Start()
        {
            Debug.Log("FL2D Initializing...");
            camera_cp = GetComponent <Camera>();
            if (camera_cp == null)
            {
                return;
            }

            InitCameras();
            UpdateRenderTextures();
            InitState();

            if (!ConsoleCommandDatabase.CommandExists("FL2D_INFO"))
            {
                ConsoleCommandDatabase.RegisterCommand("FL2D_INFO",
                                                       "FL2D status", "[none]", cmd_fl2d_info);
            }
        }