added yarn spinner package

This commit is contained in:
2026-08-14 13:27:17 +02:00
parent c140236bf7
commit c483bda3ea
573 changed files with 81459 additions and 0 deletions
@@ -0,0 +1,64 @@
/*
Yarn Spinner is licensed to you under the terms found in the file LICENSE.md.
*/
using System;
#nullable enable
namespace Yarn.Unity
{
/// <summary>
/// Represents the result of attempting to locate and call a command.
/// </summary>
/// <seealso cref="DispatchCommandToGameObject(Command, Action)"/>
/// <seealso cref="DispatchCommandToRegisteredHandlers(Command, Action)"/>
internal struct CommandDispatchResult
{
internal enum ParameterParseStatusType
{
Succeeded,
InvalidParameterType,
InvalidParameterCount,
}
internal enum StatusType
{
Succeeded,
NoTargetFound,
TargetMissingComponent,
InvalidParameterCount,
InvalidParameter,
/// <summary>
/// The command could not be found.
/// </summary>
CommandUnknown,
};
internal StatusType Status;
internal string? Message;
internal YarnTask Task;
public CommandDispatchResult(StatusType status)
{
Status = status;
Task = YarnTask.CompletedTask;
Message = null;
}
public CommandDispatchResult(StatusType status, YarnTask task)
{
Status = status;
Task = task;
Message = null;
}
}
}