ShanxiKnowledgeBase/SXElectricityInformationAcq.../Assets/Scripts/ProcessMode/ActionWithDescription.cs

29 lines
1.0 KiB
C#

using System;
using System.Collections.Generic;
using UnityEngine;
namespace DefaultNamespace.ProcessMode
{
public class ActionWithDescription
{
public List<GameObject> TargetObjects { get; set; }//需要点击的对象
public Action Action { get; set; }//动作
public string Description { get; set; } //描述
public bool IsSequential { get; set; } // 指示是否需要按顺序点击
public HashSet<GameObject> ClickedObjects { get; private set; } // 已点击的对象集合
public int CurrentObjectIndex { get; set; } // 当前对象的点击索引,仅用于按顺序点击的情况
public ActionWithDescription(List<GameObject> targetObjects, Action action, string description, bool isSequential)
{
TargetObjects = targetObjects ?? new List<GameObject>();
Action = action;
Description = description;
IsSequential = isSequential;
ClickedObjects = new HashSet<GameObject>();
CurrentObjectIndex = 0;
}
}
}