feat(battle-engine): M1 auto-copy closure (782 battle-logic files)
Compile-driven bulk-copy loop (tools/engine-port/m1_copy_loop.py) pulled the precise reference closure of the battle-core roots, stopping at the classify god-object/View-VFX-UI boundary. 782 files; no re-explosion (M0 had estimated ~order 1000). Residual frontier = 52 shim-classified + 80 external (Unity/BCL) types to author next.
This commit is contained in:
69
SVSim.BattleEngine/Engine/Wizard/RemainTime.cs
Normal file
69
SVSim.BattleEngine/Engine/Wizard/RemainTime.cs
Normal file
@@ -0,0 +1,69 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Wizard;
|
||||
|
||||
public class RemainTime
|
||||
{
|
||||
private double _endTime;
|
||||
|
||||
private double _serverUnixTime;
|
||||
|
||||
private float _sinceTime;
|
||||
|
||||
public int Second
|
||||
{
|
||||
get
|
||||
{
|
||||
int num = (int)(_endTime - NowUnixTime);
|
||||
if (num < 0)
|
||||
{
|
||||
num = 0;
|
||||
}
|
||||
return num;
|
||||
}
|
||||
}
|
||||
|
||||
public double NowUnixTime => _serverUnixTime + (double)Time.realtimeSinceStartup - (double)_sinceTime;
|
||||
|
||||
public DateTime TimeInLocal { get; private set; }
|
||||
|
||||
public string LocalTime { get; private set; }
|
||||
|
||||
public RemainTime()
|
||||
{
|
||||
}
|
||||
|
||||
public RemainTime(string endTime, double server)
|
||||
{
|
||||
_sinceTime = Time.realtimeSinceStartup;
|
||||
DateTime dateTime = DateTime.Parse(endTime);
|
||||
_endTime = ConvertTime.DateTimeToUnixTime(dateTime);
|
||||
_serverUnixTime = server;
|
||||
LocalTime = ConvertTime.ToLocal(dateTime).ToString();
|
||||
TimeInLocal = ConvertTime.ToLocalByDateTime(dateTime);
|
||||
}
|
||||
|
||||
public string GetShowText()
|
||||
{
|
||||
return GetShowText("MyPage_0058", "MyPage_0057", "MyPage_0056");
|
||||
}
|
||||
|
||||
public string GetShowText(string minuteId, string hourId, string dayId)
|
||||
{
|
||||
SystemText systemText = Data.SystemText;
|
||||
string text = null;
|
||||
if (Second < 3600)
|
||||
{
|
||||
int num = Second / 60 + 1;
|
||||
return systemText.Get(minuteId, num.ToString());
|
||||
}
|
||||
if (Second < 86400)
|
||||
{
|
||||
int num2 = Second / 3600;
|
||||
return systemText.Get(hourId, num2.ToString());
|
||||
}
|
||||
int num3 = Second / 86400;
|
||||
return systemText.Get(dayId, num3.ToString());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user