quantum-space-buddies/QSB/TimeSync/PreserveTimeScale.cs

33 lines
585 B
C#
Raw Normal View History

using Mirror;
namespace QSB.TimeSync
{
public class PreserveTimeScale : NetworkBehaviour
2020-12-02 21:29:53 +00:00
{
2022-01-23 16:14:42 +00:00
public void Init()
2020-12-02 21:29:53 +00:00
{
2022-01-23 17:31:32 +00:00
if (!isServer)
{
var campfires = FindObjectsOfType<Campfire>();
foreach (var campfire in campfires)
{
campfire._canSleepHere = false;
}
}
var menuManager = Locator.GetSceneMenuManager();
2022-01-23 17:31:32 +00:00
if (menuManager == null)
2020-12-02 21:29:53 +00:00
{
return;
}
2022-01-23 17:31:32 +00:00
if (menuManager._pauseMenu == null || menuManager.pauseMenu._skipToNextLoopButton == null)
2020-12-02 21:29:53 +00:00
{
2022-01-23 17:31:32 +00:00
return;
2020-12-02 21:29:53 +00:00
}
2022-01-23 17:31:32 +00:00
menuManager.pauseMenu._skipToNextLoopButton.SetActive(false);
2020-12-02 21:29:53 +00:00
}
}
2020-12-03 08:28:05 +00:00
}