public override CmdMessage ProcessDefault() { CmdMessage message = new CmdMessage(); message.AddLineBreak(); message.AddLine("Command Help Menu", CMStyle.Confirm); foreach (ICommand command in ConsoleCommands.Commands) { message.AddLine(new CMLine(command.Name, CMStyle.Emphasis)); message.AddLine(new CMLine(command.Description)); } return(message); }
public override CmdMessage ProcessArgs(string parameter, List <string> args) { CmdMessage message = new CmdMessage(); switch (parameter) { case "neg": message.AddLine("Param is 'neg'"); break; case "bool": message.AddLine("Param is 'bool'"); break; case "float": message.AddLine("Param is 'float'"); // IParam<float> f = Parameters.First(x => x.Name == "float") as IParam<float>; // message.AddLine("f = " + f); // message.AddLine("10 + Float: " + (10 + (int)args[0])); break; } return(message); }
public override CmdMessage ProcessArgs(string parameter, List <string> args) { CmdMessage message = new CmdMessage(); foreach (GameObject obj in GameObject.FindGameObjectsWithTag("Player")) { obj.GetComponent <Rigidbody>().useGravity = parameter.Parse <bool>(); } message.AddLine(new CMLine() { { "Set gravity to ", CMStyle.Default }, { parameter.Parse <bool>().ToString(), CMStyle.Emphasis } }); return(message); }