Ejemplo n.º 1
0
 public static void CommandQuery(commandSet targetCommandSet, commandData targetCommand)
 {
     if (targetCommandSet != null)
     {
         for (int i = 0; i < targetCommandSet.commands.Length; i++)
         {
             if (targetCommand.commandID == targetCommandSet.commands[i].commandID)
             {
                 targetCommandSet.commands[i].onCommandCall.Invoke(targetCommand.args);
             }
         }
     }
 }
Ejemplo n.º 2
0
        /*  Console base command TODO.
         *
         *  console base commands
         *  - cd "file system filepath" --ls
         *  - log
         *  - ls type/command
         *
         *  - devpowers bool  // Enable all dev comands
         *
         *  - noclip
         *  - god
         *  - notarget
         *  - layer bool "int layerid"
         *  - swithcLayer "int layerid"
         *  - clearall "typename"
         *  - killall
         *  - healall
         *  - healthmod "target entity" "int damage"
         *  - scale
         *  - pos
         *  - rotation
         */

        public static void registerBaseCommands()
        {
            if (consoleBaseCommands == null)
            {
                consoleBaseCommands          = new commandSet();
                consoleBaseCommands.commands = new command[2];

                consoleBaseCommands.commands[0]               = new command();
                consoleBaseCommands.commands[0].commandID     = "log";
                consoleBaseCommands.commands[0].onCommandCall = Log;

                consoleBaseCommands.commands[1]               = new command();
                consoleBaseCommands.commands[1].commandID     = "cd";
                consoleBaseCommands.commands[1].onCommandCall = CD;
            }
        }