Global FPS

This commit is contained in:
Lncvrt committed 2025-09-20 13:30:48 -07:00
1 parent f3bf3b694b
commit 8f41451bcb
7 files changed
+305 -384

No files matched your search

-8
View File
@@ -37,9 +37,7 @@ public class GamePlayer : MonoBehaviour
public GameObject pausePanel;
public Rigidbody2D rb;
public AudioSource backgroundMusic;
public TMP_Text fpsCounter;
private float nextUpdate;
private float fps;
public SpriteRenderer overlayRender;
private float lastMoveTime;
public GameObject berryParent;
@@ -398,12 +396,6 @@ public class GamePlayer : MonoBehaviour
{
audio.pitch = speedyLeft > 0f ? 1.3f : 1f;
}
if (BazookaManager.Instance.GetSettingShowFPS() && Time.time > nextUpdate)
{
fps = 1f / Time.deltaTime;
fpsCounter.text = "FPS: " + Mathf.Round(fps);
nextUpdate = Time.time + 0.25f;
}
if (screenWidth != Camera.main.orthographicSize * 2f * Camera.main.aspect)
{
screenWidth = Camera.main.orthographicSize * 2f * Camera.main.aspect;