public override int RunCommand(string[] input)
        {

            string direction = input[1];

            if (direction == "left")
            {
                playerMovement.command_running = true;
                playerMovement.dX = -playerMovement.speed;
                DeveloperConsole.AddStaticMessageToConsole("[USER] Moving the robot left....");
            }
            else if (direction == "right")
            {
                playerMovement.command_running = true;
                playerMovement.dX = playerMovement.speed;
                DeveloperConsole.AddStaticMessageToConsole("[USER] Moving the robot right....");
            }
            else if (direction == "up")
            {
                playerMovement.command_running = true;
                playerMovement.dZ = playerMovement.speed;
                DeveloperConsole.AddStaticMessageToConsole("[USER] Moving the robot up....");
            }
            else if (direction == "down")
            {
                playerMovement.command_running = true;
                playerMovement.dZ = -playerMovement.speed;
                DeveloperConsole.AddStaticMessageToConsole("[USER] Moving the robot down....");
            }
            else
                return 1;

            return -1;

        }
예제 #2
0
        //adds the command to the console
        public void AddCommandToConsole()
        {
            string addMessage = " command has been added to the console.";

            DeveloperConsole.AddCommandsToConsole(Command, this);
            DeveloperConsole.AddStaticMessageToConsole(Name + addMessage);
        }
 public override int RunCommand(string[] input)
 {
     playerMovement.dX = 0;
     playerMovement.dY = 0;
     playerMovement.dZ = 0;
     DeveloperConsole.AddStaticMessageToConsole("[USER] Stopping Robot....");
     return(-1);
 }
        public override void RunCommand()
        {
            //Command logic
            DeveloperConsole.AddStaticMessageToConsole("Hello World Test");

            //CommandLog
            DeveloperConsole.AddCommandToCommandLog(Command);
        }
예제 #5
0
        public void DisplayCommand()
        {
            string display = $"\n         Overview of Command {Name}            \n" +
                             $"************************************************\n" +
                             $"Name        : {Name}\n" +
                             $"Command:    : {Command}\n" +
                             $"Description : {Description}\n" +
                             $"Help        : {Help}\n" +
                             $"**************************************************";

            DeveloperConsole.AddStaticMessageToConsole(display);
        }
        public override void RunCommand()
        {
            //Command logic
            DeveloperConsole.AddStaticMessageToConsole("Previously entered commands: ");
            commandLog = DeveloperConsole.Instance.GetCommandLog();
            foreach (var CommandName in commandLog)
            {
                DeveloperConsole.AddStaticMessageToConsole(CommandName);
            }

            //CommandLog
            DeveloperConsole.AddCommandToCommandLog(Command);
        }
예제 #7
0
        public override int RunCommand(string[] input)
        {
            Dictionary <string, ConsoleCommand> .KeyCollection keys = Commands.Keys;
            string display = "\n             List of All Commands" +
                             "\n**************************************************";

            foreach (string key in keys)
            {
                display += string.Format("\n{0} : {1}\n", Commands[key].Command, Commands[key].Description);
            }

            DeveloperConsole.AddStaticMessageToConsole(display);

            return(-1);
        }
예제 #8
0
        public override int RunCommand(string[] input)
        {
            var enable = (string)input[1];

            if (enable.ToLower() == "true")
            {
                playerMovement.keys_disabled = true;
                DeveloperConsole.AddStaticMessageToConsole("[USER] Disabling Robot controls....");
            }
            else if (enable.ToLower() == "false")
            {
                playerMovement.keys_disabled = false;
                DeveloperConsole.AddStaticMessageToConsole("[USER] Enabling Robot controls....");
            }
            else
            {
                return(1);
            }

            return(-1);
        }