32 lines
1.3 KiB
C#
32 lines
1.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
namespace DefaultNamespace.ProcessMode
|
|
{
|
|
public class ActionWithDescription
|
|
{
|
|
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 ActionWithDescription(List<string> targetObjects, Action action, string description, bool isSequential, string stepDescription)
|
|
{
|
|
TargetObjects = targetObjects ?? new List<string>();
|
|
Action = action;
|
|
Description = description;
|
|
IsSequential = isSequential;
|
|
ClickedObjects = new HashSet<string>(); // 初始化已点击的对象集合
|
|
CurrentObjectIndex = 0; // 初始化为第一个对象
|
|
FeedbackDisplayed = false; // 初始化反馈未显示
|
|
|
|
StepDescription = stepDescription;
|
|
}
|
|
}
|
|
} |