提交项目

This commit is contained in:
2026-05-28 15:23:36 +08:00
commit 3cfc77d12b
5726 changed files with 554351 additions and 0 deletions
@@ -0,0 +1,55 @@
using UnityEngine;
namespace ZooMatch
{
public enum TimerTimeType : int
{
Null = -1,
Time = 0,
UnscaledTime = 1,
RealtimeSinceStartup = 2,
}
public sealed class TimerIManager : BaseUnityManager<TimerIManager>
{
private GameObject simpleTimersRoot;
private GameObject timersRoot;
private GameObject heavyTimersRoot;
private void InitTimersRoot()
{
simpleTimersRoot = new GameObject("SimpleTimers");
simpleTimersRoot.SetParent(gameObject);
timersRoot = new GameObject("Timers");
timersRoot.SetParent(gameObject);
heavyTimersRoot = new GameObject("HeavyTimers");
heavyTimersRoot.SetParent(gameObject);
}
public EasyTimer CreateSimpleTimer(string name, TimerTimeType type)
{
EasyTimer easyTimer = simpleTimersRoot.AddComponent<EasyTimer>();
easyTimer.SetTimer(name, type);
return easyTimer;
}
public Timer CreateTimer(string name, TimerTimeType type)
{
Timer timer = timersRoot.AddComponent<Timer>();
timer.SetTimer(name, type);
return timer;
}
#region Mgr
public override void Init()
{
base.Init();
InitTimersRoot();
}
#endregion
}
}