changed scene loading flow

This commit is contained in:
2023-07-30 21:46:42 +03:00
parent 92062cd708
commit fb58dedfaf
5 changed files with 32 additions and 24 deletions
@@ -22,9 +22,13 @@ namespace Ragon.Client;
internal class AuthorizeSuccessHandler: Handler
{
private readonly RagonListenerList _listenerList;
private readonly RagonClient _client;
public AuthorizeSuccessHandler(RagonListenerList listenerList)
public AuthorizeSuccessHandler(
RagonClient client,
RagonListenerList listenerList)
{
_client = client;
_listenerList = listenerList;
}
@@ -34,6 +38,7 @@ internal class AuthorizeSuccessHandler: Handler
var playerName = buffer.ReadString();
var playerPayload = buffer.ReadString();
_client.SetStatus(RagonStatus.LOBBY);
_listenerList.OnAuthorizationSuccess(playerId, playerName, playerPayload);
}
}