基础案例 准备改帧同步了

This commit is contained in:
DESKTOP-5RP3AKU\Jisol
2024-10-21 02:09:30 +08:00
parent 44e2735899
commit cbacd5a501
117 changed files with 17049 additions and 4808 deletions

View File

@@ -1,4 +1,5 @@
using System;
using GAS.Runtime;
using UnityEngine;
namespace GAS.General
@@ -16,7 +17,7 @@ namespace GAS.General
public static int CurrentFrameCount => _currentFrameCount;
public static void UpdateCurrentFrameCount()
{
_currentFrameCount = Mathf.FloorToInt((Timestamp() - _startTimestamp) / 1000f * FrameRate);
_currentFrameCount = Mathf.FloorToInt((Timestamp() - _startTimestamp) / 1000f * JexGasManager.FrameRate);
}
private static long _startTimestamp;
@@ -37,7 +38,5 @@ namespace GAS.General
_deltaTime -= (int)(Timestamp() - _pauseTimestamp);
}
private static int _frameRate = 60;
public static int FrameRate => _frameRate;
}
}