Files
modular-vr/Assets/Engine/Runtime/Measurements/PlanResult.cs
2023-03-22 07:54:00 +01:00

33 lines
1.2 KiB
C#

using JetBrains.Annotations;
using Realms;
namespace EscapeRoomEngine.Engine.Runtime.Measurements
{
/// <summary>
/// The target and estimated time, along with the percentile since the last section, that will be stored in the database.
/// </summary>
public class PlanResult : EmbeddedObject
{
/// <summary>
/// The target time set by the game master when this section ended.
/// </summary>
public float TargetTime { get; set; }
/// <summary>
/// The percentile of the current player during this section.
/// </summary>
public float SectionPercentile { get; set; }
/// <summary>
/// The estimated time to complete the whole puzzle plan when this section ended.
/// </summary>
public float TimeEstimation { get; set; }
[UsedImplicitly]
public PlanResult() {}
public PlanResult(float targetTime, float sectionPercentile, float timeEstimation)
{
TargetTime = targetTime;
SectionPercentile = float.IsNaN(sectionPercentile) ? 0.5f : sectionPercentile;
TimeEstimation = timeEstimation;
}
}
}