43 lines
1.2 KiB
C#
43 lines
1.2 KiB
C#
using System.Collections.Generic;
|
|
|
|
namespace DefaultNamespace.ProcessMode
|
|
{
|
|
public class AnimationProcess
|
|
{
|
|
public string Type { get; set; } // 流程类型(例如:教学、培训、练习)
|
|
public List<AnimationStep> Steps { get; private set; } // 流程中的步骤列表
|
|
|
|
/// <summary>
|
|
/// 构造函数
|
|
/// </summary>
|
|
/// <param name="type">流程类型</param>
|
|
public AnimationProcess(string type)
|
|
{
|
|
Type = type;
|
|
Steps = new List<AnimationStep>();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 添加步骤到流程中
|
|
/// </summary>
|
|
/// <param name="step">要添加的步骤</param>
|
|
public void AddStep(AnimationStep step)
|
|
{
|
|
Steps.Add(step);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 计算流程的总评分
|
|
/// </summary>
|
|
/// <returns>总评分</returns>
|
|
public float CalculateTotalScore()
|
|
{
|
|
float totalScore = 0;
|
|
foreach (AnimationStep step in Steps)
|
|
{
|
|
totalScore += step.Score;
|
|
}
|
|
return totalScore;
|
|
}
|
|
}
|
|
} |