using System;
using UnityEngine;

namespace Utility
{
    [Serializable]
    public struct SimpleTime
    {
        [SerializeField, Range(0, 23)]
        private byte _hour;
        [SerializeField, Range(0, 59)]
        private byte _minutes;

        public int Hour
        {
            get => _hour;
            set => _hour = (byte)value;
        }
        
        public int Minute
        {
            get => _minutes;
            set => _minutes = (byte)value;
        }
        
        public TimeSpan ToTimeSpan() => new(_hour, _minutes, 0);
    }
}