mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-21 00:39:53 +00:00
small cleanup
This commit is contained in:
parent
b507ed2588
commit
016c983065
@ -4,6 +4,11 @@ namespace QuantumUNET.Components
|
||||
{
|
||||
public class QSBNetworkManagerHUD : MonoBehaviour
|
||||
{
|
||||
public QSBNetworkManagerUNET manager;
|
||||
public bool showGUI = true;
|
||||
public int offsetX;
|
||||
public int offsetY;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
manager = GetComponent<QSBNetworkManagerUNET>();
|
||||
@ -92,18 +97,5 @@ namespace QuantumUNET.Components
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public QSBNetworkManagerUNET manager;
|
||||
|
||||
[SerializeField]
|
||||
public bool showGUI = true;
|
||||
|
||||
[SerializeField]
|
||||
public int offsetX;
|
||||
|
||||
[SerializeField]
|
||||
public int offsetY;
|
||||
|
||||
private bool m_ShowServer;
|
||||
}
|
||||
}
|
@ -1060,7 +1060,7 @@ namespace QuantumUNET
|
||||
}
|
||||
uv.RebuildObservers(true);
|
||||
SendSpawnMessage(uv, null);
|
||||
ulocalConnectionToClient.localClient.AddLocalPlayer(newPlayerController);
|
||||
ulocalConnectionToClient.LocalClient.AddLocalPlayer(newPlayerController);
|
||||
uv.SetClientOwner(conn);
|
||||
uv.ForceAuthority(true);
|
||||
uv.SetLocalPlayer(newPlayerController.PlayerControllerId);
|
||||
|
@ -7,44 +7,38 @@ namespace QuantumUNET
|
||||
public QSBULocalConnectionToClient(QSBLocalClient localClient)
|
||||
{
|
||||
address = "localClient";
|
||||
m_LocalClient = localClient;
|
||||
LocalClient = localClient;
|
||||
}
|
||||
|
||||
public QSBLocalClient localClient
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_LocalClient;
|
||||
}
|
||||
}
|
||||
public QSBLocalClient LocalClient { get; }
|
||||
|
||||
public override bool Send(short msgType, QSBMessageBase msg)
|
||||
{
|
||||
m_LocalClient.InvokeHandlerOnClient(msgType, msg, 0);
|
||||
LocalClient.InvokeHandlerOnClient(msgType, msg, 0);
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool SendUnreliable(short msgType, QSBMessageBase msg)
|
||||
{
|
||||
m_LocalClient.InvokeHandlerOnClient(msgType, msg, 1);
|
||||
LocalClient.InvokeHandlerOnClient(msgType, msg, 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool SendByChannel(short msgType, QSBMessageBase msg, int channelId)
|
||||
{
|
||||
m_LocalClient.InvokeHandlerOnClient(msgType, msg, channelId);
|
||||
LocalClient.InvokeHandlerOnClient(msgType, msg, channelId);
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool SendBytes(byte[] bytes, int numBytes, int channelId)
|
||||
{
|
||||
m_LocalClient.InvokeBytesOnClient(bytes, channelId);
|
||||
LocalClient.InvokeBytesOnClient(bytes, channelId);
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool SendWriter(QSBNetworkWriter writer, int channelId)
|
||||
{
|
||||
m_LocalClient.InvokeBytesOnClient(writer.AsArray(), channelId);
|
||||
LocalClient.InvokeBytesOnClient(writer.AsArray(), channelId);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -61,7 +55,5 @@ namespace QuantumUNET
|
||||
numMsgs = 0;
|
||||
numBytes = 0;
|
||||
}
|
||||
|
||||
private QSBLocalClient m_LocalClient;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user