暂停功能

This commit is contained in:
2024-10-16 20:28:07 +08:00
parent e869e5e43f
commit 6b334ce47d
6 changed files with 132 additions and 126 deletions
+8 -1
View File
@@ -38,12 +38,19 @@ namespace AibisDream.Utility
return CommandLineType.NonCommand;
}
public static bool TryGetCommandAttr(this MarkupParseResult text, out string commandName)
public static bool TryGetOptionCommandAttr(this MarkupParseResult text, out string commandName)
{
bool res = text.TryGetAttributeWithName(CommandAttr, out var attribute);
commandName = res ? attribute.Properties[CommandProp].StringValue : null;
return res;
}
public static bool TryGetPauseCommandAttr(this MarkupParseResult text, out string commandName)
{
bool res = text.TryGetAttributeWithName(PauseAttr, out var attribute);
commandName = res ? attribute.Properties[CommandProp].StringValue : null;
return res;
}
public static void AddCommandListener(this DialogueRunner runner, CommandHandler onCommand)
{