using System.Collections.Generic;

namespace DefaultNamespace.ProcessMode
{
    /// <summary>
    /// 主流程
    /// </summary>
    public class ProcessStep
    {
        public string StepDescription { get; set; } // 步骤描述
        public List<ProcessStepDescription> Actions { get; private set; } // 动作列表
        public bool IsCompleted { get; set; } // 是否已经完成

        public ProcessStep(string stepDescription, List<ProcessStepDescription> actions)
        {
            StepDescription = stepDescription;
            Actions = actions;
            IsCompleted = false;
        }

        public void PlayAnimation(int index)
        {
            if (index >= 0 && index < Actions.Count)
            {
                Actions[index].Action?.Invoke(); // 执行动画
            }
        }
    }
}