测试1
This commit is contained in:
@@ -63,7 +63,7 @@ namespace TcgEngine.Client
|
||||
match_timer += Time.deltaTime;
|
||||
|
||||
//Send periodic request
|
||||
if (IsConnected() && timer > 2f)
|
||||
if (IsConnected() && TcgNetwork.Get().ClientID != 0 && timer > 2f)
|
||||
{
|
||||
timer = 0f;
|
||||
SendMatchRequest(true, matchmaking_group, matchmaking_players);
|
||||
@@ -118,7 +118,7 @@ namespace TcgEngine.Client
|
||||
{
|
||||
Connect(NetworkData.Get().url, NetworkData.Get().port, (bool success) =>
|
||||
{
|
||||
if(success)
|
||||
if (success)
|
||||
SendMatchmakingListRequest();
|
||||
});
|
||||
}
|
||||
@@ -132,10 +132,10 @@ namespace TcgEngine.Client
|
||||
});
|
||||
}
|
||||
|
||||
public void Connect(string url, ushort port, UnityAction<bool> callback=null)
|
||||
public void Connect(string url, ushort port, UnityAction<bool> callback = null)
|
||||
{
|
||||
//Must be logged in to API to connect
|
||||
if(!Authenticator.Get().IsSignedIn())
|
||||
if (!Authenticator.Get().IsSignedIn())
|
||||
{
|
||||
callback?.Invoke(false);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user