1
This commit is contained in:
33
Packages/Runtime/SubSystems/Time/TimeSystem.cs
Normal file
33
Packages/Runtime/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;
|
||||
}
|
||||
}
|
||||
}
|
11
Packages/Runtime/SubSystems/Time/TimeSystem.cs.meta
Normal file
11
Packages/Runtime/SubSystems/Time/TimeSystem.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3d2e15ca6473ce1459573e583f2921d4
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Reference in New Issue
Block a user