上传文件至 Common

This commit is contained in:
2025-10-13 18:18:47 +08:00
parent 535e955faf
commit 566c6190ff
25 changed files with 1487 additions and 0 deletions

36
Common/Graphic.cs Normal file
View File

@@ -0,0 +1,36 @@
using UnityEngine;
namespace SinmaiAssist.Common;
public class Graphic
{
public static void ToggleFullscreen()
{
Screen.fullScreen = !Screen.fullScreen;
}
public static int GetResolutionWidth()
{
return Screen.width;
}
public static int GetResolutionHeight()
{
return Screen.height;
}
public static void SetResolution(int width, int height)
{
Screen.SetResolution(width, height, Screen.fullScreen);
}
public static int GetMaxFrameRate()
{
return Application.targetFrameRate;
}
public static void SetMaxFrameRate(int fps)
{
Application.targetFrameRate = fps;
QualitySettings.vSyncCount = 0;
}
}