public static void SetFontSize(int size) { if (size < 10) { DevConsole.LogError("Font size would be too small"); } else if (size > 20) { DevConsole.LogError("Font size would be too big"); } else { DevConsole.TextObject().fontSize = size; DevConsole.Log("Change successful :D", "green"); } }
private bool InformFailedParse(int argPos, FailReason reason) { switch (reason) { case FailReason.ParseFailed: DevConsole.LogError($"Failed to run command. Failed to parse arg at pos {argPos}."); break; case FailReason.NoArgsPassed: DevConsole.LogError("Failed to run command. This command requires args to be passed."); break; case FailReason.NotEnoughArgs: DevConsole.LogError("Failed to run command. Not enough args passed."); break; default: DevConsole.LogError($"Failed to run command. Arg type unknown or failed to parse an arg at pos {argPos}."); break; } return(false); }