mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-09 03:40:46 +00:00
Update QSBNetworkManager.cs
This commit is contained in:
parent
858395308d
commit
1ab181f62c
@ -31,14 +31,14 @@ namespace QSB
|
|||||||
public event Action OnNetworkManagerReady;
|
public event Action OnNetworkManagerReady;
|
||||||
|
|
||||||
public bool IsReady { get; private set; }
|
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 MaxConnections = 128;
|
||||||
private const int MaxBufferedPackets = 64;
|
private const int MaxBufferedPackets = 64;
|
||||||
|
|
||||||
private QSBNetworkLobby _lobby;
|
private QSBNetworkLobby _lobby;
|
||||||
private AssetBundle _assetBundle;
|
private AssetBundle _assetBundle;
|
||||||
//private GameObject _shipPrefab;
|
|
||||||
private GameObject _cameraPrefab;
|
private GameObject _cameraPrefab;
|
||||||
private GameObject _probePrefab;
|
private GameObject _probePrefab;
|
||||||
private GameObject _stickPrefab;
|
private GameObject _stickPrefab;
|
||||||
@ -66,6 +66,12 @@ namespace QSB
|
|||||||
_cameraPrefab.AddComponent<PlayerCameraSync>();
|
_cameraPrefab.AddComponent<PlayerCameraSync>();
|
||||||
spawnPrefabs.Add(_cameraPrefab);
|
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");
|
_probePrefab = _assetBundle.LoadAsset<GameObject>("assets/networkprobe.prefab");
|
||||||
SetupNetworkId(_probePrefab);
|
SetupNetworkId(_probePrefab);
|
||||||
SetupNetworkTransform(_probePrefab);
|
SetupNetworkTransform(_probePrefab);
|
||||||
|
Loading…
Reference in New Issue
Block a user