using System; using System.Collections.Generic; using UnityEngine; namespace DefaultNamespace.ProcessMode { public class ActionWithDescription { public List TargetObjects { get; set; } public Action Action { get; set; } public string Description { get; set; } public bool IsSequential { get; set; } // 是否按顺序点击 public HashSet ClickedObjects { get; private set; } // 已点击的对象集合 public int CurrentObjectIndex { get; set; } // 当前对象的点击索引,仅用于按顺序点击的情况 public bool FeedbackDisplayed { get; set; } // 是否已经显示过反馈 public string StepDescription { get; set; } public ActionWithDescription(List targetObjects, Action action, string description, bool isSequential, string stepDescription) { TargetObjects = targetObjects ?? new List(); Action = action; Description = description; IsSequential = isSequential; ClickedObjects = new HashSet(); // 初始化已点击的对象集合 CurrentObjectIndex = 0; // 初始化为第一个对象 FeedbackDisplayed = false; // 初始化反馈未显示 StepDescription = stepDescription; } } }