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.
|
* 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;
|
private const int FrameLimit = 30;
|
||||||
|
|
||||||
@ -16,12 +17,11 @@ namespace frame_limiter
|
|||||||
private static void AddMeToScene()
|
private static void AddMeToScene()
|
||||||
{
|
{
|
||||||
new GameObject("__FrameLimiter__").AddComponent<FrameLimiter>();
|
new GameObject("__FrameLimiter__").AddComponent<FrameLimiter>();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
PlayerInventory inventory = LocalPlayer.Inventory;
|
var inventory = LocalPlayer.Inventory;
|
||||||
if (inventory == null)
|
if (inventory == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@ -34,7 +34,6 @@ namespace frame_limiter
|
|||||||
Application.targetFrameRate = FrameLimit;
|
Application.targetFrameRate = FrameLimit;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case PlayerInventory.PlayerViews.Loading:
|
case PlayerInventory.PlayerViews.Loading:
|
||||||
{
|
{
|
||||||
Application.targetFrameRate = FrameLimit;
|
Application.targetFrameRate = FrameLimit;
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user