NLDClient-yudde/ProjectNLD/Assets/Code/Scripts/Gameplay/Debug/Deprecated/SROptions.CheckCrossDay.cs

57 lines
1.6 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

using System;
using Framework;
using System.ComponentModel;
public partial class SROptions
{
/*[Category("跨天检测"), DisplayName("检查节点-小时")]
public int Hours { get; set; }
[Category("跨天检测"), DisplayName("检查节点-分钟")]
public int Minutes { get; set; }
[Category("跨天检测"), DisplayName("检查节点-秒")]
public int Seconds { get; set; }
[Category("跨天检测"), DisplayName("设置检测时间")]
public void SetCheckTime()
{
if (Hours is < 0 or >= 24)
{
DebugUtil.LogError("GM设置检查时间单位小时错误范围在0-23");
return;
}
if (Minutes is < 0 or >= 60)
{
DebugUtil.LogError("GM设置检查时间单位分钟错误范围在0-59");
return;
}
if (Seconds is < 0 or >= 60)
{
DebugUtil.LogError("GM设置检查时间单位秒错误范围在0-59");
return;
}
CrossDayChecker.Instance.SetCheckTime(new TimeSpan(Hours, Minutes, Seconds));
}
[Category("跨天检测"), DisplayName("发送跨天事件")]
public void SendCrossDay()
{
EventManager.Instance.Send(EventManager.EventName.CrossDay);
}
[Category("跨天检测"), DisplayName("直接发送跨周事件")]
public void SendCrossWeek()
{
EventManager.Instance.Send(EventManager.EventName.CrossWeek);
}
[Category("跨天检测"), DisplayName("直接发送跨月事件")]
public void SendCrossMonth()
{
EventManager.Instance.Send(EventManager.EventName.CrossMonth);
}*/
}