1
This commit is contained in:
33
Unity/Scripts/SubSystems/Time/TimeSystem.cs
Normal file
33
Unity/Scripts/SubSystems/Time/TimeSystem.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user