Update QSBNetworkManager.cs

This commit is contained in:
Mister_Nebula 2021-04-13 21:31:59 +01:00
parent 858395308d
commit 1ab181f62c

View File

@ -31,14 +31,14 @@ namespace QSB
public event Action OnNetworkManagerReady;
public bool IsReady { get; private set; }
public GameObject OrbPrefab { get; set; }
public GameObject OrbPrefab { get; private set; }
public GameObject ShipPrefab { get; private set; }
private const int MaxConnections = 128;
private const int MaxBufferedPackets = 64;
private QSBNetworkLobby _lobby;
private AssetBundle _assetBundle;
//private GameObject _shipPrefab;
private GameObject _cameraPrefab;
private GameObject _probePrefab;
private GameObject _stickPrefab;
@ -66,6 +66,12 @@ namespace QSB
_cameraPrefab.AddComponent<PlayerCameraSync>();
spawnPrefabs.Add(_cameraPrefab);
ShipPrefab = _assetBundle.LoadAsset<GameObject>("assets/networkship.prefab");
SetupNetworkId(ShipPrefab);
SetupNetworkTransform(_cameraPrefab);
ShipPrefab.AddComponent<ShipTransformSync>();
spawnPrefabs.Add(ShipPrefab);
_probePrefab = _assetBundle.LoadAsset<GameObject>("assets/networkprobe.prefab");
SetupNetworkId(_probePrefab);
SetupNetworkTransform(_probePrefab);