Changed Label to RichtTextLabel for scrolling compatabillity
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using YourProject.Commands;
|
||||
using TextRPG.Commands;
|
||||
|
||||
namespace YourProject.Commands
|
||||
namespace TextRPG.Commands
|
||||
{
|
||||
public class ClearCommand : Command
|
||||
{
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace YourProject.Commands // Add namespace
|
||||
namespace TextRPG.Commands
|
||||
{
|
||||
public abstract class Command
|
||||
{
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using YourProject.Commands;
|
||||
using TextRPG.Commands;
|
||||
|
||||
namespace YourProject.Commands
|
||||
namespace TextRPG.Commands
|
||||
{
|
||||
public static class ConsoleManager
|
||||
{
|
||||
@@ -14,6 +14,8 @@ namespace YourProject.Commands
|
||||
// Register all commands
|
||||
RegisterCommand(new HelpCommand());
|
||||
RegisterCommand(new ClearCommand());
|
||||
RegisterCommand(new TimeCommand());
|
||||
|
||||
}
|
||||
|
||||
public static void RegisterCommand(Command command)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using YourProject.Commands; // Reference the namespace
|
||||
using TextRPG.Commands;
|
||||
|
||||
namespace YourProject.Commands
|
||||
namespace TextRPG.Commands
|
||||
{
|
||||
public class HelpCommand : Command
|
||||
{
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using TextRPG.Commands;
|
||||
|
||||
namespace TextRPG.Commands
|
||||
{
|
||||
public class TimeCommand : Command
|
||||
{
|
||||
public override string Name => "time";
|
||||
public override string Description => "Outputs the current time";
|
||||
public override string Usage => "time";
|
||||
|
||||
public override void Execute(string[] args, Action<string> outputCallback)
|
||||
{
|
||||
// Send a special marker that the console UI will recognize
|
||||
outputCallback("12:23");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user