/* Yarn Spinner is licensed to you under the terms found in the file LICENSE.md. */ using System; #nullable enable namespace Yarn.Unity { /// /// Represents the result of attempting to locate and call a command. /// /// /// internal struct CommandDispatchResult { internal enum ParameterParseStatusType { Succeeded, InvalidParameterType, InvalidParameterCount, } internal enum StatusType { Succeeded, NoTargetFound, TargetMissingComponent, InvalidParameterCount, InvalidParameter, /// /// The command could not be found. /// 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; } } }