Files
2025-08-31 18:14:07 -04:00

31 lines
846 B
C#

using System;
using UnityEngine;
namespace Ingvar.LiveWatch.TowerDefenceDemo
{
[DefaultExecutionOrder(-99999)]
public class TD_WatchManager : MonoBehaviour
{
private void Awake()
{
Watch.DestroyAll();
Watch.GetOrAdd("Frame", () => Time.frameCount)
.SetAlwaysCollapsable()
.SetSortOrder(TD_WatchSortOrder.Frame);
Watch.GetOrAdd("FPS", () => (int)(1f / Time.unscaledDeltaTime))
.SetAlwaysCollapsable()
.SetSortOrder(TD_WatchSortOrder.FPS);
Watch.GetOrAdd("TimeScale", () => Time.timeScale)
.SetAlwaysCollapsable()
.SetSortOrder(TD_WatchSortOrder.TimeScale);
}
private void LateUpdate()
{
Watch.UpdateAll();
}
}
}