mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-21 00:39:53 +00:00
hiding the meditation button (for server and clients) (#34)
This commit is contained in:
parent
11f5d7de23
commit
3f80846988
@ -1,12 +1,20 @@
|
||||
using OWML.ModHelper.Events;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Networking;
|
||||
|
||||
namespace QSB.TimeSync
|
||||
{
|
||||
public class PreserveTimeScale : MonoBehaviour
|
||||
public class PreserveTimeScale : NetworkBehaviour
|
||||
{
|
||||
private void Start()
|
||||
{
|
||||
QSB.Helper.Menus.PauseMenu.GetButton("Button-EndCurrentLoop").Hide();
|
||||
|
||||
if (isServer)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
GlobalMessenger.AddListener("GamePaused", OnPause);
|
||||
|
||||
var campfires = GameObject.FindObjectsOfType<Campfire>();
|
||||
|
@ -47,13 +47,13 @@ namespace QSB.TimeSync
|
||||
private void OnWakeUp()
|
||||
{
|
||||
_state = State.Awake;
|
||||
gameObject.AddComponent<PreserveTimeScale>();
|
||||
if (isServer)
|
||||
{
|
||||
SendServerTime();
|
||||
}
|
||||
else
|
||||
{
|
||||
gameObject.AddComponent<PreserveTimeScale>();
|
||||
WakeUpOrSleep();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user