mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 10:46:17 +00:00
基础案例 准备改帧同步了
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user