mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
Update GameTime.cs
This commit is contained in:
@@ -1,19 +1,33 @@
|
||||
namespace TEngine
|
||||
using UnityEngine;
|
||||
|
||||
namespace TEngine
|
||||
{
|
||||
public class GameTime
|
||||
/// <summary>
|
||||
/// 游戏时间。
|
||||
/// <remarks>统一封装调用。</remarks>
|
||||
/// </summary>
|
||||
public static class GameTime
|
||||
{
|
||||
public static float time;
|
||||
|
||||
public static float deltaTime;
|
||||
|
||||
public static float unscaledDeltaTime;
|
||||
|
||||
public static float fixedDeltaTime;
|
||||
|
||||
public static float frameCount;
|
||||
|
||||
public static float unscaledTime;
|
||||
|
||||
public static float unscaledDeltaTime;
|
||||
|
||||
public static float fixedUnscaledDeltaTime;
|
||||
|
||||
public static float realtimeSinceStartup;
|
||||
public static void StartFrame()
|
||||
{
|
||||
time = Time.time;
|
||||
deltaTime = Time.deltaTime;
|
||||
unscaledDeltaTime = Time.unscaledDeltaTime;
|
||||
fixedDeltaTime = Time.fixedDeltaTime;
|
||||
frameCount = Time.frameCount;
|
||||
unscaledTime = Time.unscaledTime;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user