cleanup
This commit is contained in:
parent
529222e17d
commit
6c122db1b4
@ -9,6 +9,7 @@ namespace frame_limiter
|
||||
{
|
||||
/**
|
||||
* The frame limit to apply when the player is in the pause menu or loading screen.
|
||||
* todo: make this configurable?
|
||||
*/
|
||||
private const int FrameLimit = 30;
|
||||
|
||||
@ -16,12 +17,11 @@ namespace frame_limiter
|
||||
private static void AddMeToScene()
|
||||
{
|
||||
new GameObject("__FrameLimiter__").AddComponent<FrameLimiter>();
|
||||
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
PlayerInventory inventory = LocalPlayer.Inventory;
|
||||
var inventory = LocalPlayer.Inventory;
|
||||
if (inventory == null)
|
||||
{
|
||||
return;
|
||||
@ -34,7 +34,6 @@ namespace frame_limiter
|
||||
Application.targetFrameRate = FrameLimit;
|
||||
break;
|
||||
}
|
||||
|
||||
case PlayerInventory.PlayerViews.Loading:
|
||||
{
|
||||
Application.targetFrameRate = FrameLimit;
|
||||
@ -44,7 +43,7 @@ namespace frame_limiter
|
||||
{
|
||||
Application.targetFrameRate = PlayerPreferences.MaxFrameRate;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user