// Copyright (c) Pixel Crushers. All rights reserved.
using UnityEngine;
namespace PixelCrushers.DialogueSystem.SequencerCommands
{
///
/// Holds the definition of a sequencer command while it's in the queue.
///
public class QueuedSequencerCommand
{
///
/// The command (e.g., Camera).
///
public string command;
///
/// The parameters to the command.
///
public string[] parameters;
///
/// The start time when the command should be taken out of the queue and run.
///
public float startTime;
///
/// If not null stay in the queue until this message is received.
///
public string messageToWaitFor;
///
/// An optional message to send the sequencer when the command completes.
///
public string endMessage;
///
/// If true, the sequencer will run this command even if the sequence is cancelled.
///
public bool required;
///
/// The GameObject assigned as the speaker.
///
public Transform speaker;
///
/// The GameObject assigned as the listener.
///
public Transform listener;
///
/// Initializes a new QueuedSequencerCommand.
///
///
/// The command.
///
///
/// The parameters to the command.
///
///
/// Start time to play the command.
///
///
/// Optional message to wait for.
///
///
/// Optional message to send when the command completes.
///
///
/// Required flag.
///
public QueuedSequencerCommand(string command, string[] parameters, float startTime, string messageToWaitFor, string endMessage, bool required, Transform speaker = null, Transform listener = null)
{
this.command = command;
this.parameters = parameters;
this.startTime = startTime;
this.messageToWaitFor = messageToWaitFor;
this.endMessage = endMessage;
this.required = required;
this.speaker = speaker;
this.listener = listener;
}
}
}