move puzzle implementations out of engine
This commit is contained in:
@@ -1,34 +0,0 @@
|
||||
using EscapeRoomEngine.Engine.Runtime.Measurements;
|
||||
using EscapeRoomEngine.Engine.Runtime.Modules;
|
||||
using EscapeRoomEngine.Engine.Runtime.Utilities;
|
||||
using NaughtyAttributes;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace EscapeRoomEngine.Engine.Runtime.UI
|
||||
{
|
||||
/// <summary>
|
||||
/// An entry in the <see cref="PuzzlePlan"/> UI component that displays the name and estimated time for a puzzle.
|
||||
/// </summary>
|
||||
public class PuzzlePlanEntry : MonoBehaviour
|
||||
{
|
||||
[BoxGroup("Internal")] [Required] [SerializeField]
|
||||
private Text puzzleName, estimatedTime;
|
||||
|
||||
public Vector2 Position
|
||||
{
|
||||
set
|
||||
{
|
||||
puzzleName.rectTransform.anchoredPosition = value;
|
||||
}
|
||||
}
|
||||
public PuzzleModuleDescription Puzzle
|
||||
{
|
||||
set
|
||||
{
|
||||
puzzleName.text = value.puzzleName;
|
||||
estimatedTime.text = $"Time Estimate: {Measure.EstimateTime(value).ToTimeSpan():mm':'ss}";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user