mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-06 01:00:16 +00:00
cleanup more of qnetworkmanager
This commit is contained in:
parent
e34db1af14
commit
6e964512db
@ -11,10 +11,8 @@ namespace QuantumUNET.Components
|
|||||||
public class QNetworkManager : MonoBehaviour
|
public class QNetworkManager : MonoBehaviour
|
||||||
{
|
{
|
||||||
public static QNetworkManager singleton;
|
public static QNetworkManager singleton;
|
||||||
public static string networkSceneName = "";
|
|
||||||
|
|
||||||
public int networkPort { get; set; } = 7777;
|
public int networkPort { get; set; } = 7777;
|
||||||
public int simulatedLatency { get; set; } = 1;
|
|
||||||
public bool serverBindToIP { get; set; }
|
public bool serverBindToIP { get; set; }
|
||||||
public bool dontDestroyOnLoad { get; set; } = true;
|
public bool dontDestroyOnLoad { get; set; } = true;
|
||||||
public bool runInBackground { get; set; } = true;
|
public bool runInBackground { get; set; } = true;
|
||||||
@ -193,15 +191,6 @@ namespace QuantumUNET.Components
|
|||||||
RegisterServerMessages();
|
RegisterServerMessages();
|
||||||
QLog.Log($"NetworkManager StartServer port:{networkPort}");
|
QLog.Log($"NetworkManager StartServer port:{networkPort}");
|
||||||
isNetworkActive = true;
|
isNetworkActive = true;
|
||||||
var name = SceneManager.GetSceneAt(0).name;
|
|
||||||
if (!string.IsNullOrEmpty(onlineScene) && onlineScene != name && onlineScene != offlineScene)
|
|
||||||
{
|
|
||||||
ServerChangeScene(onlineScene);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
QNetworkServer.SpawnObjects();
|
|
||||||
}
|
|
||||||
QNetworkServer.SpawnObjects();
|
QNetworkServer.SpawnObjects();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user