using System;
using System.Collections.Generic;

namespace DefaultNamespace.ProcessMode
{
    /// <summary>
    /// 子流程
    /// </summary>
    public class ProcessStepDescription
    {
        public List<string> TargetObjects { get; set; }
        public Action Action { get; set; }
        public string Description { get; set; }
        public bool IsSequential { get; set; } // 是否按顺序点击
        public HashSet<string> ClickedObjects { get; private set; } // 已点击的对象集合
        public int CurrentObjectIndex { get; set; } // 当前对象的点击索引，仅用于按顺序点击的情况
        public bool FeedbackDisplayed { get; set; } // 是否已经显示过反馈
        public string StepDescription { get; set; }
        public bool IsUI { get; set; }
        public float Score { get; set; } // 新增：动作评分

        public ProcessStepDescription(List<string> targetObjects, Action action, string description, bool isSequential, string stepDescription, bool isUI, float score = 0)
        {
            TargetObjects = targetObjects ?? new List<string>();
            Action = action;
            Description = description;
            IsSequential = isSequential;
            ClickedObjects = new HashSet<string>(); // 初始化已点击的对象集合
            CurrentObjectIndex = 0; // 初始化为第一个对象
            FeedbackDisplayed = false; // 初始化反馈未显示
            StepDescription = stepDescription;
            IsUI = isUI;
            Score = score; // 初始化动作分数
        }
    }
}