33 lines
912 B
C#
33 lines
912 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using Cysharp.Threading.Tasks;
|
|
namespace BITKit
|
|
{
|
|
public static partial class Utility
|
|
{
|
|
public static class Time
|
|
{
|
|
public static float time;
|
|
public static double timeAsDouble;
|
|
public static float deltaTime = 1f / 30;
|
|
public static float fixedDeltaTime = 1f / 60;
|
|
public static float unscaledDeltaTime;
|
|
}
|
|
}
|
|
|
|
}
|
|
namespace BITKit.SubSystems
|
|
{
|
|
[SubSystemConfig(isMainThread = true)]
|
|
public class TimeSystem : SubBITSystem
|
|
{
|
|
public override void OnUpdate(float deltaTime)
|
|
{
|
|
Utility.Time.time = Time.time;
|
|
Utility.Time.timeAsDouble = Time.timeAsDouble;
|
|
Utility.Time.deltaTime = Time.deltaTime;
|
|
Utility.Time.unscaledDeltaTime = Time.unscaledDeltaTime;
|
|
}
|
|
}
|
|
} |