small cleanup

This commit is contained in:
Mister_Nebula 2020-12-08 09:03:10 +00:00
parent b507ed2588
commit 016c983065
3 changed files with 13 additions and 29 deletions

View File

@ -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;
}
}

View File

@ -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);

View File

@ -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;
}
}